package net.xiduth.net.decoders.handlers;

import java.util.List;

import net.xiduth.Settings;
import net.xiduth.cores.WorldThread;
import net.xiduth.game.Animation;
import net.xiduth.game.ForceTalk;
import net.xiduth.game.Graphics;
import net.xiduth.game.Hit;
import net.xiduth.game.Hit.HitLook;
import net.xiduth.game.World;
import net.xiduth.game.WorldObject;
import net.xiduth.game.WorldTile;
import net.xiduth.game.item.Item;
import net.xiduth.game.item.MagicOnItem;
import net.xiduth.game.npc.NPC;
import net.xiduth.game.npc.familiar.Familiar.SpecialAttack;
import net.xiduth.game.npc.pet.Pet;
import net.xiduth.game.player.ClueScrolls;
import net.xiduth.game.player.CoordsEvent;
import net.xiduth.game.player.Equipment;
import net.xiduth.game.player.Inventory;
import net.xiduth.game.player.Player;
import net.xiduth.game.player.Skills;
import net.xiduth.game.player.actions.BoxAction;
import net.xiduth.game.player.actions.BoxAction.HunterEquipment;
import net.xiduth.game.player.actions.Firemaking;
import net.xiduth.game.player.actions.Fletching;
import net.xiduth.game.player.actions.Fletching.Fletch;
import net.xiduth.game.player.actions.GemCutting;
import net.xiduth.game.player.actions.GemCutting.Gem;
import net.xiduth.game.player.actions.HerbCleaning;
import net.xiduth.game.player.actions.Herblore;
import net.xiduth.game.player.actions.LeatherCrafting;
import net.xiduth.game.player.actions.Summoning;
import net.xiduth.game.player.actions.Summoning.Pouches;
import net.xiduth.game.player.content.AncientEffigies;
import net.xiduth.game.player.content.ArmourSets;
import net.xiduth.game.player.content.ArmourSets.Sets;
import net.xiduth.game.player.content.Burying.Bone;
import net.xiduth.game.player.content.CrystalChest;
import net.xiduth.game.player.content.Dicing;
import net.xiduth.game.player.content.Foods;
import net.xiduth.game.player.content.Magic;
import net.xiduth.game.player.content.Pots;
import net.xiduth.game.player.content.Runecrafting;
import net.xiduth.game.player.content.SkillCapeCustomizer;
import net.xiduth.game.player.content.livid.LividFarm;
import net.xiduth.game.player.controlers.Barrows;
import net.xiduth.game.player.controlers.DTControler;
import net.xiduth.game.player.controlers.FightKiln;
import net.xiduth.game.player.controlers.PestControler;
import net.xiduth.game.player.controlers.RunespanControler;
import net.xiduth.game.player.controlers.ZombieMinigame;
import net.xiduth.game.player.controlers.dung.RuneDungGame;
import net.xiduth.game.player.controlers.trollinvasion.TrollInvasion;
import net.xiduth.game.tasks.WorldTask;
import net.xiduth.game.tasks.WorldTasksManager;
import net.xiduth.io.InputStream;
import net.xiduth.utils.Logger;
import net.xiduth.utils.Misc;
import net.xiduth.utils.Misc.LampType;
import net.xiduth.utils.ToyHorsey;
import net.xiduth.utils.Utils;

public class InventoryOptionsHandler {

	public static void handleItemOption2(final Player player, final int slotId,
			final int itemId, Item item) {
		if (Firemaking.isFiremaking(player, itemId))
			return;
		if (itemId == 249) {
			player.getInventory().deleteItem(249, 1);
			player.getInventory().addItem(6681, 1);
		}
		if (itemId >= 5509 && itemId <= 5514) {
			int pouch = -1;
			if (itemId == 5509)
				pouch = 0;
			if (itemId == 5510)
				pouch = 1;
			if (itemId == 5512)
				pouch = 2;
			if (itemId == 5514)
				pouch = 3;
			Runecrafting.emptyPouch(player, pouch);
			player.stopAll(false);
		} else if (itemId >= 15086 && itemId <= 15100) {
			if (player.isExtremeDonator()) {
				player.getPackets().sendGameMessage("Rolling...");
				player.setNextGraphics(new Graphics(2075));
				player.setNextAnimation(new Animation(11900));
				int numberRolled = Utils.getRandom(100);
				player.setNextForceTalk(new ForceTalk("You rolled <col=FF0000>"
						+ numberRolled + "</col> " + "on the percentile dice"));
				player.getPackets().sendGameMessage(
						"rolled <col=FF0000>" + numberRolled + "</col> "
								+ "on the percentile dice");
			}
			return;
		} else if (itemId == 4155) {
			player.getPackets().sendGameMessage(
					"You need to defeat " + player.getTask().getTaskAmount()
							+ " " + player.getTask().getName().toLowerCase()
							+ " to complete your task.");
		} else {
			if (player.isEquipDisabled())
				return;
			long passedTime = Utils.currentTimeMillis()
					- WorldThread.LAST_CYCLE_CTM;
			WorldTasksManager.schedule(new WorldTask() {

				@Override
				public void run() {
					List<Integer> slots = player.getSwitchItemCache();
					int[] slot = new int[slots.size()];
					for (int i = 0; i < slot.length; i++)
						slot[i] = slots.get(i);
					player.getSwitchItemCache().clear();
					ButtonHandler.sendWear(player, slot);
					player.stopAll(false, true, false);
				}
			}, passedTime >= 600 ? 0 : passedTime > 330 ? 1 : 0);
			if (player.getSwitchItemCache().contains(slotId))
				return;
			player.getSwitchItemCache().add(slotId);
		}
	}
	
	 public static void DFS(Player player, final int slotId, final int itemId) {
			if (itemId == 11283) {
				player.out("You're shield has " +player.DFS+ " charges.");
			} else {
			}
		}

	public static void handleItemOnPlayer(final Player player,
			final Player usedOn, final int itemId) {
		player.setCoordsEvent(new CoordsEvent(usedOn, new Runnable() {
			public void run() {
				player.faceEntity(usedOn);
				if (usedOn.getInterfaceManager().containsScreenInter()) {
					player.sendMessage(usedOn.getDisplayName() + " is busy.");
					return;
				}
				if (!usedOn.hasAcceptAid()) {
					player.sendMessage(usedOn.getDisplayName()
							+ " doesn't want to accept your items.");
					return;
				}
				switch (itemId) {
				case 962:
					if (player.getInventory().getFreeSlots() < 3
							|| usedOn.getInventory().getFreeSlots() < 3) {
						player.sendMessage((player.getInventory()
								.getFreeSlots() < 3 ? "You do"
								: "The other player does")
								+ " not have enough inventory space to open this cracker.");
						return;
					}
					player.getDialogueManager().startDialogue(
							"ChristmasCrackerD", usedOn, itemId);
					break;
				default:
					player.sendMessage("Nothing interesting happens.");
					break;
				}
			}
		}, usedOn.getSize()));
	}

	public static void dig(final Player player) {
		player.resetWalkSteps();
		player.setNextAnimation(new Animation(830));
		player.lock();
		WorldTasksManager.schedule(new WorldTask() {

			@Override
			public void run() {
				player.unlock();
				if (Barrows.digIntoGrave(player))
					return;
				if (player.getX() == 3005 && player.getY() == 3376
						|| player.getX() == 2999 && player.getY() == 3375
						|| player.getX() == 2996 && player.getY() == 3377
						|| player.getX() == 2989 && player.getY() == 3378
						|| player.getX() == 2987 && player.getY() == 3387
						|| player.getX() == 2984 && player.getY() == 3387) {
					// mole
					player.setNextWorldTile(new WorldTile(1752, 5137, 0));
					player.getPackets()
							.sendGameMessage(
									"You seem to have dropped down into a network of mole tunnels.");
					return;
				}
				if (ClueScrolls.digSpot(player)) {
					return;
				}
				player.getPackets().sendGameMessage("You find nothing.");
			}

		});
	}

	public static void handleItemOption1(Player player, final int slotId,
			final int itemId, Item item) {
		for (int i : ClueScrolls.ScrollIds) {
			if (itemId == i) {
				if (ClueScrolls.Scrolls.getMap(itemId) != null) {
					ClueScrolls.showMap(player,
							ClueScrolls.Scrolls.getMap(itemId));
					return;
				}
				if (ClueScrolls.Scrolls.getObjMap(itemId) != null) {
					ClueScrolls.showObjectMap(player,
							ClueScrolls.Scrolls.getObjMap(itemId));
					return;
				}
				if (ClueScrolls.Scrolls.getRiddles(itemId) != null) {
					ClueScrolls.showRiddle(player,
							ClueScrolls.Scrolls.getRiddles(itemId));
					return;
				}
			}

		}
		if (itemId == 2717) {
			ClueScrolls.giveReward(player);
		}
		if (itemId == 2520) {
			ToyHorsey.play(player);
		}
		if (itemId == 2522) {
			ToyHorsey.play(player);
		}

		if (itemId == 2524) {
			ToyHorsey.play(player);
		}

		if (itemId == 2526) {
			ToyHorsey.play(player);
		}
		if (itemId == 21776) {
			if (player.getSkills().getLevel(Skills.CRAFTING) > 80
					&& player.getInventory().containsItem(21776, 100)) {
				player.getInventory().deleteItem(21776, 100);
				player.getInventory().addItem(21775, 1);
				player.getSkills().addXp(Skills.CRAFTING, 500);
				player.getPackets().sendGameMessage(
						"You combine the shards to create an orb.");
			} else {
				player.getPackets().sendGameMessage(
						"Insufficient shards or crafting level.");
			}
		}
		if (itemId == 15342) {
			if (!player.isShaking) {
				player.setNextForceTalk(new ForceTalk(
						"Hmm... it wouldn't be a good time to use this."));
				return;
			}
			player.stopAll();
			player.getPackets().sendStopCameraShake();
			player.applyHit(new Hit(player, 10, HitLook.REGULAR_DAMAGE, 0));
			player.stopAll();
			player.addPoisonImmune(180000);
			player.setNextAnimation(new Animation(3170));
			player.setNextForceTalk(new ForceTalk("Ugh..."));
			player.isShaking = false;
		}
		if (itemId == 7509) {
			if (player.getHitpoints() <= 10) {
				player.getPackets().sendGameMessage(
						"You need more than 10 Hitpoints to eat this.");
				return;
			}
			player.getInventory().containsItem(7509, 1);
			player.setNextForceTalk(new ForceTalk("Ow! I nearly broke a tooth!"));
			player.applyHit(new Hit(player, 10, HitLook.REGULAR_DAMAGE, 0));
		}
		if (itemId == 299) {
			if (player.isLocked())
				return;
			if (World.getObject(new WorldTile(player), 10) != null) {
				player.getPackets().sendGameMessage(
						"You cannot plant flowers here...");
				return;
			}
			final Player thisman = player;
			final double random = Utils.getRandomDouble(100);
			final WorldTile tile = new WorldTile(player);
			int flower = Utils.random(2980, 2987);
			if (random < 0.2) {
				flower = Utils.random(2987, 2989);
			}
			if (!player.addWalkSteps(player.getX() - 1, player.getY(), 1))
				if (!player.addWalkSteps(player.getX() + 1, player.getY(), 1))
					if (!player.addWalkSteps(player.getX(), player.getY() + 1,
							1))
						player.addWalkSteps(player.getX(), player.getY() - 1, 1);
			player.getInventory().deleteItem(299, 1);
			final WorldObject flowerObject = new WorldObject(flower, 10,
					Utils.getRandom(4), tile.getX(), tile.getY(),
					tile.getPlane());
			World.spawnTemporaryObject(flowerObject, 45000);
			player.lock();
			WorldTasksManager.schedule(new WorldTask() {
				int step;

				@Override
				public void run() {
					if (thisman == null || thisman.hasFinished())
						stop();
					if (step == 1) {
						thisman.getDialogueManager().startDialogue(
								"FlowerPickup", flowerObject);
						thisman.setNextFaceWorldTile(tile);
						thisman.unlock();
						stop();
					}
					step++;
				}
			}, 0, 0);

		}
		long time = Utils.currentTimeMillis();
		if (player.getLockDelay() >= time
				|| player.getEmotesManager().getNextEmoteEnd() >= time)
			return;
		player.stopAll(false);
		if (Foods.eat(player, item, slotId))
			return;
		if (itemId >= 15086 && itemId <= 15100) {
			Dicing.handleRoll(player, itemId, false);
			return;
		}
		if (Pots.pot(player, item, slotId))
			return;
		if (itemId >= 5509 && itemId <= 5514) {
			int pouch = -1;
			if (itemId == 5509)
				pouch = 0;
			if (itemId == 5510)
				pouch = 1;
			if (itemId == 5512)
				pouch = 2;
			if (itemId == 5514)
				pouch = 3;
			Runecrafting.fillPouch(player, pouch);
			return;
		}
		if (itemId == 22370) {
			Summoning.openDreadnipInterface(player);
		}
		if (itemId == 6950) {
			player.getDialogueManager().startDialogue("LividOrb");
		}
		if (itemId == 20704) {
			LividFarm.bunchPlants(player);
		}
		if (itemId == 952) {
			dig(player);
			return;
		}
		if (HerbCleaning.clean(player, item, slotId))
			return;
		Bone bone = Bone.forId(itemId);
		if (bone != null) {
			Bone.bury(player, slotId);
			return;
		}
		switch (itemId) {
		case 23713:
		case 23714:
		case 23715:
		case 23716:
			player.getDialogueManager().startDialogue("ExperienceLamp", itemId == 23713 ? 1000 : itemId == 23714 ? 2500 : itemId == 23715 ? 5000 : 10000, itemId);
			return;
		case 23717:
			player.getDialogueManager().startDialogue("SkillExperienceLamp", Skills.ATTACK, LampType.SMALL, item);
			return;
		case 23719:
			player.getDialogueManager().startDialogue("SkillExperienceLamp", Skills.ATTACK, LampType.LARGE, item);
			return;
		case 23759:
			player.getDialogueManager().startDialogue("SkillExperienceLamp", Skills.AGILITY, LampType.LARGE, item);
			return;
		}
		if (Magic.useTabTeleport(player, itemId))
			return;
		if (itemId == AncientEffigies.SATED_ANCIENT_EFFIGY
				|| itemId == AncientEffigies.GORGED_ANCIENT_EFFIGY
				|| itemId == AncientEffigies.NOURISHED_ANCIENT_EFFIGY
				|| itemId == AncientEffigies.STARVED_ANCIENT_EFFIGY)
			player.getDialogueManager().startDialogue("AncientEffigiesD",
					itemId);
		else if (itemId == 24456) {
			player.getDialogueManager().startDialogue("SimplePlayerMessage", "Damn, I feel powerful.");
		} else if (itemId == 23714) {
			player.getInterfaceManager().sendInterface(1263);
		} else if (itemId == 22340) {
			player.getDialogueManager().startDialogue("XPBook");
		}	else if (itemId == 24154 && player.getInventory().containsItem(24154, 1)) {
				player.getSquealOfFortune().setSpins(player.getSquealOfFortune().getSpins() + 1);
				player.getSquealOfFortune().showSpins();
				player.getInventory().deleteItem(new Item(itemId, 1));
				player.sendMessage("You cash in your double spin ticket for 1 more spin!");
				
		} else if (itemId == 24155 && player.getInventory().containsItem(24155, 1)) {
				player.getSquealOfFortune().setSpins(player.getSquealOfFortune().getSpins() + 2);
				player.getSquealOfFortune().showSpins();
				player.getInventory().deleteItem(new Item(itemId, 1));
				player.sendMessage("You cash in your double spin ticket for two more spins!");
		} else if (itemId == 23717) {
			player.getSkills().addXp(Skills.ATTACK, 3000);
			player.getInventory().deleteItem(23717, 1);
		} else if (itemId == 23721) {
			player.getSkills().addXp(Skills.STRENGTH, 3000);
			player.getInventory().deleteItem(23721, 1);
		} else if (itemId == 23725) {
			player.getSkills().addXp(Skills.DEFENCE, 3000);
			player.getInventory().deleteItem(23725, 1);
		} else if (itemId == 23729) {
			player.getSkills().addXp(Skills.RANGE, 3000);
			player.getInventory().deleteItem(23729, 1);
		} else if (itemId == 23733) {
			player.getSkills().addXp(Skills.MAGIC, 3000);
			player.getInventory().deleteItem(23733, 1);
		} else if (itemId == 23737) {
			player.getSkills().addXp(Skills.PRAYER, 3000);
			player.getInventory().deleteItem(23737, 1);
		} else if (itemId == 23741) {
			player.getSkills().addXp(Skills.RUNECRAFTING, 3000);
			player.getInventory().deleteItem(23741, 1);
		} else if (itemId == 23745) {
			player.getSkills().addXp(Skills.CONSTRUCTION, 3000);
			player.getInventory().deleteItem(23745, 1);
		} else if (itemId == 23749) {
			player.getSkills().addXp(Skills.DUNGEONEERING, 23500);
			player.getInventory().deleteItem(23749, 1);
		} else if (itemId == 23753) {
			player.getSkills().addXp(Skills.HITPOINTS, 3000);
			player.getInventory().deleteItem(23753, 1);
		} else if (itemId == 23757) {
			player.getSkills().addXp(Skills.AGILITY, 3000);
			player.getInventory().deleteItem(23757, 1);
		} else if (itemId == 23761) {
			player.getSkills().addXp(Skills.HERBLORE, 3000);
			player.getInventory().deleteItem(23761, 1);
		} else if (itemId == 23765) {
			player.getSkills().addXp(Skills.THIEVING, 3000);
			player.getInventory().deleteItem(23765, 1);
		} else if (itemId == 23769) {
			player.getSkills().addXp(Skills.CRAFTING, 3000);
			player.getInventory().deleteItem(23769, 1);
		} else if (itemId == 23774) {
			player.getSkills().addXp(Skills.FLETCHING, 3000);
			player.getInventory().deleteItem(23774, 1);
		} else if (itemId == 23778) {
			player.getSkills().addXp(Skills.SLAYER, 3000);
			player.getInventory().deleteItem(23778, 1);
		} else if (itemId == 23782) {
			player.getSkills().addXp(Skills.HUNTER, 3000);
			player.getInventory().deleteItem(23782, 1);
		} else if (itemId == 23786) {
			player.getSkills().addXp(Skills.MINING, 3000);
			player.getInventory().deleteItem(23786, 1);
		} else if (itemId == 23790) {
			player.getSkills().addXp(Skills.SMITHING, 3000);
			player.getInventory().deleteItem(23790, 1);
		} else if (itemId == 23794) {
			player.getSkills().addXp(Skills.FISHING, 3000);
			player.getInventory().deleteItem(23794, 1);
		} else if (itemId == 23798) {
			player.getSkills().addXp(Skills.COOKING, 3000);
			player.getInventory().deleteItem(23798, 1);
		} else if (itemId == 23802) {
			player.getSkills().addXp(Skills.FIREMAKING, 3000);
			player.getInventory().deleteItem(23802, 1);
		} else if (itemId == 23806) {
			player.getSkills().addXp(Skills.WOODCUTTING, 3000);
			player.getInventory().deleteItem(23806, 1);
		} else if (itemId == 23810) {
			player.getSkills().addXp(Skills.FARMING, 3000);
			player.getInventory().deleteItem(23810, 1);
		} else if (itemId == 23814) {
			player.getSkills().addXp(Skills.SUMMONING, 3000);
			player.getInventory().deleteItem(23814, 1);
		} else if (itemId == 23718) {
			player.getSkills().addXp(Skills.ATTACK, 7500);
			player.getInventory().deleteItem(23718, 1);
		} else if (itemId == 23722) {
			player.getSkills().addXp(Skills.STRENGTH, 7500);
			player.getInventory().deleteItem(23722, 1);
		} else if (itemId == 23726) {
			player.getSkills().addXp(Skills.DEFENCE, 7500);
			player.getInventory().deleteItem(23726, 1);
		} else if (itemId == 23730) {
			player.getSkills().addXp(Skills.RANGE, 7500);
			player.getInventory().deleteItem(23730, 1);
		} else if (itemId == 23734) {
			player.getSkills().addXp(Skills.MAGIC, 7500);
			player.getInventory().deleteItem(23734, 1);
		} else if (itemId == 23738) {
			player.getSkills().addXp(Skills.PRAYER, 7500);
			player.getInventory().deleteItem(23738, 1);
		} else if (itemId == 23742) {
			player.getSkills().addXp(Skills.RUNECRAFTING, 7500);
			player.getInventory().deleteItem(23742, 1);
		} else if (itemId == 23746) {
			player.getSkills().addXp(Skills.CONSTRUCTION, 7500);
			player.getInventory().deleteItem(23746, 1);
		} else if (itemId == 23750) {
			player.getSkills().addXp(Skills.DUNGEONEERING, 7500);
			player.getInventory().deleteItem(23750, 1);
		} else if (itemId == 23754) {
			player.getSkills().addXp(Skills.HITPOINTS, 7500);
			player.getInventory().deleteItem(23754, 1);
		} else if (itemId == 23758) {
			player.getSkills().addXp(Skills.AGILITY, 7500);
			player.getInventory().deleteItem(23758, 1);
		} else if (itemId == 23762) {
			player.getSkills().addXp(Skills.HERBLORE, 7500);
			player.getInventory().deleteItem(23762, 1);
		} else if (itemId == 23766) {
			player.getSkills().addXp(Skills.THIEVING, 7500);
			player.getInventory().deleteItem(23766, 1);
		} else if (itemId == 23770) {
			player.getSkills().addXp(Skills.CRAFTING, 7500);
			player.getInventory().deleteItem(23770, 1);
		} else if (itemId == 23775) {
			player.getSkills().addXp(Skills.FLETCHING, 7500);
			player.getInventory().deleteItem(23775, 1);
		} else if (itemId == 23779) {
			player.getSkills().addXp(Skills.SLAYER, 7500);
			player.getInventory().deleteItem(23779, 1);
		} else if (itemId == 23783) {
			player.getSkills().addXp(Skills.HUNTER, 7500);
			player.getInventory().deleteItem(23783, 1);
		} else if (itemId == 23787) {
			player.getSkills().addXp(Skills.MINING, 7500);
			player.getInventory().deleteItem(23787, 1);
		} else if (itemId == 23791) {
			player.getSkills().addXp(Skills.SMITHING, 7500);
			player.getInventory().deleteItem(23791, 1);
		} else if (itemId == 23795) {
			player.getSkills().addXp(Skills.FISHING, 7500);
			player.getInventory().deleteItem(23795, 1);
		} else if (itemId == 23799) {
			player.getSkills().addXp(Skills.COOKING, 7500);
			player.getInventory().deleteItem(23799, 1);
		} else if (itemId == 23803) {
			player.getSkills().addXp(Skills.FIREMAKING, 7500);
			player.getInventory().deleteItem(23803, 1);
		} else if (itemId == 23807) {
			player.getSkills().addXp(Skills.WOODCUTTING, 7500);
			player.getInventory().deleteItem(23807, 1);
		} else if (itemId == 23811) {
			player.getSkills().addXp(Skills.FARMING, 7500);
			player.getInventory().deleteItem(23811, 1);
		} else if (itemId == 23815) {
			player.getSkills().addXp(Skills.SUMMONING, 7500);
			player.getInventory().deleteItem(23815, 1);
		} else if (itemId == 23719) {
			player.getSkills().addXp(Skills.ATTACK, 14000);
			player.getInventory().deleteItem(23719, 1);
		} else if (itemId == 23723) {
			player.getSkills().addXp(Skills.STRENGTH, 14000);
			player.getInventory().deleteItem(23723, 1);
		} else if (itemId == 23727) {
			player.getSkills().addXp(Skills.DEFENCE, 14000);
			player.getInventory().deleteItem(23727, 1);
		} else if (itemId == 23731) {
			player.getSkills().addXp(Skills.RANGE, 14000);
			player.getInventory().deleteItem(23731, 1);
		} else if (itemId == 23735) {
			player.getSkills().addXp(Skills.MAGIC, 14000);
			player.getInventory().deleteItem(23735, 1);
		} else if (itemId == 23739) {
			player.getSkills().addXp(Skills.PRAYER, 14000);
			player.getInventory().deleteItem(23739, 1);
		} else if (itemId == 23743) {
			player.getSkills().addXp(Skills.RUNECRAFTING, 14000);
			player.getInventory().deleteItem(23743, 1);
		} else if (itemId == 23747) {
			player.getSkills().addXp(Skills.CONSTRUCTION, 14000);
			player.getInventory().deleteItem(23747, 1);
		} else if (itemId == 23751) {
			player.getSkills().addXp(Skills.DUNGEONEERING, 14000);
			player.getInventory().deleteItem(23751, 1);
		} else if (itemId == 23755) {
			player.getSkills().addXp(Skills.HITPOINTS, 14000);
			player.getInventory().deleteItem(23755, 1);
		} else if (itemId == 23759) {
			player.getSkills().addXp(Skills.AGILITY, 14000);
			player.getInventory().deleteItem(23759, 1);
		} else if (itemId == 23763) {
			player.getSkills().addXp(Skills.HERBLORE, 14000);
			player.getInventory().deleteItem(23763, 1);
		} else if (itemId == 23767) {
			player.getSkills().addXp(Skills.THIEVING, 14000);
			player.getInventory().deleteItem(23767, 1);
		} else if (itemId == 23771) {
			player.getSkills().addXp(Skills.CRAFTING, 14000);
			player.getInventory().deleteItem(23771, 1);
		} else if (itemId == 23776) {
			player.getSkills().addXp(Skills.FLETCHING, 14000);
			player.getInventory().deleteItem(23776, 1);
		} else if (itemId == 23780) {
			player.getSkills().addXp(Skills.SLAYER, 14000);
			player.getInventory().deleteItem(23780, 1);
		} else if (itemId == 23784) {
			player.getSkills().addXp(Skills.HUNTER, 14000);
			player.getInventory().deleteItem(23784, 1);
		} else if (itemId == 23788) {
			player.getSkills().addXp(Skills.MINING, 14000);
			player.getInventory().deleteItem(23788, 1);
		} else if (itemId == 23792) {
			player.getSkills().addXp(Skills.SMITHING, 14000);
			player.getInventory().deleteItem(23792, 1);
		} else if (itemId == 23796) {
			player.getSkills().addXp(Skills.FISHING, 14000);
			player.getInventory().deleteItem(23796, 1);
		} else if (itemId == 23800) {
			player.getSkills().addXp(Skills.COOKING, 14000);
			player.getInventory().deleteItem(23800, 1);
		} else if (itemId == 23804) {
			player.getSkills().addXp(Skills.FIREMAKING, 14000);
			player.getInventory().deleteItem(23804, 1);
		} else if (itemId == 23808) {
			player.getSkills().addXp(Skills.WOODCUTTING, 14000);
			player.getInventory().deleteItem(23808, 1);
		} else if (itemId == 23812) {
			player.getSkills().addXp(Skills.FARMING, 14000);
			player.getInventory().deleteItem(23812, 1);
		} else if (itemId == 23816) {
			player.getSkills().addXp(Skills.SUMMONING, 14000);
			player.getInventory().deleteItem(23816, 1);
		} else if (itemId == 23720) {
			player.getSkills().addXp(Skills.ATTACK, 50000);
			player.getInventory().deleteItem(23720, 1);
		} else if (itemId == 23724) {
			player.getSkills().addXp(Skills.STRENGTH, 50000);
			player.getInventory().deleteItem(23724, 1);
		} else if (itemId == 23728) {
			player.getSkills().addXp(Skills.DEFENCE, 5000);
			player.getInventory().deleteItem(23728, 1);
		} else if (itemId == 23732) {
			player.getSkills().addXp(Skills.RANGE, 500000);
			player.getInventory().deleteItem(23732, 1);
		} else if (itemId == 23736) {
			player.getSkills().addXp(Skills.MAGIC, 50000);
			player.getInventory().deleteItem(23736, 1);
		} else if (itemId == 23740) {
			player.getSkills().addXp(Skills.PRAYER, 50000);
			player.getInventory().deleteItem(23740, 1);
		} else if (itemId == 23744) {
			player.getSkills().addXp(Skills.RUNECRAFTING, 50000);
			player.getInventory().deleteItem(23744, 1);
		} else if (itemId == 23748) {
			player.getSkills().addXp(Skills.CONSTRUCTION, 50000);
			player.getInventory().deleteItem(23748, 1);
		} else if (itemId == 23752) {
			player.getSkills().addXp(Skills.DUNGEONEERING, 50000);
			player.getInventory().deleteItem(23752, 1);
		} else if (itemId == 23756) {
			player.getSkills().addXp(Skills.HITPOINTS, 50000);
			player.getInventory().deleteItem(23756, 1);
		} else if (itemId == 23760) {
			player.getSkills().addXp(Skills.AGILITY, 50000);
			player.getInventory().deleteItem(23760, 1);
		} else if (itemId == 23764) {
			player.getSkills().addXp(Skills.HERBLORE, 50000);
			player.getInventory().deleteItem(23764, 1);
		} else if (itemId == 23768) {
			player.getSkills().addXp(Skills.THIEVING, 50000);
			player.getInventory().deleteItem(23768, 1);
		} else if (itemId == 23772) {
			player.getSkills().addXp(Skills.CRAFTING, 50000);
			player.getInventory().deleteItem(23772, 1);
		} else if (itemId == 23777) {
			player.getSkills().addXp(Skills.FLETCHING, 50000);
			player.getInventory().deleteItem(23777, 1);
		} else if (itemId == 23781) {
			player.getSkills().addXp(Skills.SLAYER, 50000);
			player.getInventory().deleteItem(23781, 1);
		} else if (itemId == 23785) {
			player.getSkills().addXp(Skills.HUNTER, 50000);
			player.getInventory().deleteItem(23785, 1);
		} else if (itemId == 23789) {
			player.getSkills().addXp(Skills.MINING, 50000);
			player.getInventory().deleteItem(23789, 1);
		} else if (itemId == 23793) {
			player.getSkills().addXp(Skills.SMITHING, 50000);
			player.getInventory().deleteItem(23793, 1);
		} else if (itemId == 23797) {
			player.getSkills().addXp(Skills.FISHING, 50000);
			player.getInventory().deleteItem(23797, 1);
		} else if (itemId == 23801) {
			player.getSkills().addXp(Skills.COOKING, 50000);
			player.getInventory().deleteItem(23801, 1);
		} else if (itemId == 23805) {
			player.getSkills().addXp(Skills.FIREMAKING, 50000);
			player.getInventory().deleteItem(23805, 1);
		} else if (itemId == 23809) {
			player.getSkills().addXp(Skills.WOODCUTTING, 50000);
			player.getInventory().deleteItem(23809, 1);
		} else if (itemId == 23813) {
			player.getSkills().addXp(Skills.FARMING, 50000);
			player.getInventory().deleteItem(23813, 1);
		} else if (itemId == 23817) {
			player.getSkills().addXp(Skills.SUMMONING, 50000);
			player.getInventory().deleteItem(23817, 1);
		} else if (itemId == 16) {
			player.getInventory().deleteItem(16, 1);
			player.getInventory().addItem(10834, 1);
			player.getPackets().sendGameMessage(
					"You blow the whistle... and it transforms into a bag.");
		} else if (itemId == 19478) {
			if (player.getAttackedByDelay() + 10000 > Utils.currentTimeMillis() ||
					(player.isLocked()
							|| player.getControlerManager().getControler() instanceof RunespanControler 
							|| player.getControlerManager().getControler() instanceof PestControler || 
							player.getControlerManager().getControler() instanceof RuneDungGame || 
							player.getControlerManager().getControler() instanceof ZombieMinigame || player.getControlerManager().getControler() instanceof DTControler 
							|| player.getControlerManager().getControler() instanceof TrollInvasion))
					{ 
				player.getPackets()
						.sendGameMessage(
								"You can't use this right now.");
				return;
			}
			player.getDialogueManager().startDialogue("ScrollTele");
		} else if (itemId == 6199) {
			if (player.getAttackedByDelay() + 10000 > Utils.currentTimeMillis() ||
					(player.isLocked()
							|| player.getControlerManager().getControler() instanceof RunespanControler 
							|| player.getControlerManager().getControler() instanceof PestControler || 
							player.getControlerManager().getControler() instanceof RuneDungGame || 
							player.getControlerManager().getControler() instanceof ZombieMinigame || player.getControlerManager().getControler() instanceof DTControler 
							|| player.getControlerManager().getControler() instanceof TrollInvasion))
					{ 
				player.getPackets()
						.sendGameMessage(
								"You can't use this right now.");
				return;
			}
			player.getDialogueManager().startDialogue("VoteBox");
		} else if (itemId == 10834) {
			int[] RandomItems = {18745, 2665, 2667, 2661, 2663, 2653, 2655, 2657, 4151, 10286, 10288, 11235, 
					10330, 10332, 10334, 2659, 3478, 3479, 4037, 4039, 18746, 2669, 2671, 2673, 2675, 3480,
					18744, 14497, 14499, 14501, 6106, 6107, 6109, 6110, 6111, 10607, 10828, 8850, 1052,
					17273, 14490, 14492, 14494, 1075, 1087, 1103, 1117, 1139, 1155, 1173, 
					405, 11789, 21472, 1189, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 1307,
					3265, 3265, 3265, 3265, 3265, 3265, 3265, 3265, 3265, 3265, 3265, 3265, 405, 405, 405,
					989, 989, 989, 989, 989, 989, 989, 989, 989, 989, 989, 989, 989, 989, 989, 989,
					4151, 4151, 4151, 4151, 4151, 4151, 989, 989, 989, 10607,
					11690, 23680, 2581, 20949, 20950, 20951, 20952, 12929, 15332, 6199, 9185, 837,
					1205, 1333, 1303, 1347, 7158, 23696, 1161, 2591, 2593, 2595, 2597, 2607, 2609, 2611,
					2613, 2615, 2617, 2619, 2621, 23695, 23693, 23694, 6591, 6597, 6623, 6621, 6625, 
					6627, 6629, 6631, 6633, 6633, 6633, 6633, 10420, 10422, 10618, 10695, 19275,
					10336, 10338, 10340, 10342, 10344, 10346, 10348, 10350, 10352, 3204, 4087, 4585,
					4587, 14484, 1149, 1187, 1215, 1249, 1305, 1377, 5681, 23874, 23882, 2577, 6585, 
					405, 989, 1050, 6570, 8839, 8840, 8842, 4315, 4316, 4317, 4318, 4319, 4320, 4321, 
					4322, 4323, 4324, 4325, 4326, 4327, 4328, 4329, 4330, 1077, 1089, 1107, 1125, 1151, 1165,
					1179, 1195, 1217, 1283, 1297, 1313, 1327, 1341, 1071, 1085, 1109, 1121, 1143, 1159, 1181, 1197,
					1209, 1243, 1273, 1285, 1299, 6746, 12915, 12908, 5574, 5575, 5576, 11732, 3105, 4131
					};
			player.getInventory().deleteItem(10834, 1);
			player.getInventory().addItem(RandomItems[Misc.random(RandomItems.length)], 1);
			player.getPackets().sendGameMessage(
					"You've recieved an item from the bag!");
			return;
		} else if (itemId == 24300) {
			player.getSkills().addXp(Skills.ATTACK, 2000000);
			player.getSkills().addXp(Skills.STRENGTH, 2000000);
			player.getSkills().addXp(Skills.DEFENCE, 2000000);
			player.getSkills().addXp(Skills.RANGE, 2000000);
			player.getSkills().addXp(Skills.MAGIC, 2000000);
			player.getSkills().addXp(Skills.PRAYER, 2000000);
			player.getSkills().addXp(Skills.RUNECRAFTING, 2000000);
			player.getSkills().addXp(Skills.CONSTRUCTION, 2000000);
			player.getSkills().addXp(Skills.DUNGEONEERING, 2000000);
			player.getSkills().addXp(Skills.HITPOINTS, 2000000);
			player.getSkills().addXp(Skills.AGILITY, 2000000);
			player.getSkills().addXp(Skills.HERBLORE, 2000000);
			player.getSkills().addXp(Skills.THIEVING, 2000000);
			player.getSkills().addXp(Skills.CRAFTING, 2000000);
			player.getSkills().addXp(Skills.FLETCHING, 2000000);
			player.getSkills().addXp(Skills.SLAYER, 2000000);
			player.getSkills().addXp(Skills.HUNTER, 2000000);
			player.getSkills().addXp(Skills.MINING, 2000000);
			player.getSkills().addXp(Skills.SMITHING, 2000000);
			player.getSkills().addXp(Skills.FISHING, 2000000);
			player.getSkills().addXp(Skills.COOKING, 2000000);
			player.getSkills().addXp(Skills.FIREMAKING, 2000000);
			player.getSkills().addXp(Skills.WOODCUTTING, 2000000);
			player.getSkills().addXp(Skills.FARMING, 2000000);
			player.getSkills().addXp(Skills.SUMMONING, 2000000);
			player.getPackets()
					.sendGameMessage(
							"The gods have heard your plea, and grant you 200,000,000 experience!");
			player.getInventory().deleteItem(24300, 1);
		}

		if (itemId == 405) {
			int[] reward = { 10000, 20000, 30000, 50000, 75000, 80000, 100000 };
			int won = reward[Utils.random(reward.length - 1)];
			player.getInventory().deleteItem(405, 1);
			player.getInventory().addItem(995, won);
			player.getPackets()
					.sendGameMessage(
							"The casket slowly opens... You receive " + won
									+ " coins!");
		} else if (itemId == 4155)
			player.getDialogueManager().startDialogue("EnchantedGemDialouge");
		else if (itemId == 6099)
			player.getDialogueManager().startDialogue("TeleportCrystal");
		else if (itemId >= 23653 && itemId <= 23658)
			FightKiln.useCrystal(player, itemId);
		if (itemId == 11967) {// Added in by Google(Kyle)
			if(!(player.getInventory().getFreeSlots() > 3)){
				player.getPackets().sendGameMessage("You need more than 4 spaces in your inventory.");
			}
			if(player.getInventory().getFreeSlots() > 3){
			player.getInventory().deleteItem(11967, 1);
			player.getInventory().addItem(8, 1);
			player.getInventory().addItem(10, 1);
			player.getInventory().addItem(12, 1);
			player.getInventory().addItem(6, 1);}
		}
		if (itemId == 11916) {// Added in by Google(Kyle)
			if(!(player.getInventory().getFreeSlots() > 1)){
				player.getPackets().sendGameMessage("You need more than 2 spaces in your inventory.");
			}
			if(!(player.getInventory().getFreeSlots() > 1)){
			player.getInventory().deleteItem(11916, 1);
			player.getInventory().addItem(7376, 1);
			player.getInventory().addItem(7384, 1);}
		}
		if (itemId == 11914) {// Added in by Google(Kyle)
			if(!(player.getInventory().getFreeSlots() > 1)){
				player.getPackets().sendGameMessage("You need more than 2 spaces in your inventory.");
			}
			if(player.getInventory().getFreeSlots() > 1){
			player.getInventory().deleteItem(11914, 1);
			player.getInventory().addItem(7370, 1);
			player.getInventory().addItem(7378, 1);}
		}
		if (itemId == 11912) {// Added in by Google(Kyle)
			if(!(player.getInventory().getFreeSlots() > 1)){
				player.getPackets().sendGameMessage("You need more than 2 spaces in your inventory.");
			}
			if(player.getInventory().getFreeSlots() > 1){
			player.getInventory().deleteItem(11912, 1);
			player.getInventory().addItem(7372, 1);
			player.getInventory().addItem(7380, 1);}
		}
		if (itemId == 11910) {// Added in by Google(Kyle)
			if(!(player.getInventory().getFreeSlots() > 1)){
				player.getPackets().sendGameMessage("You need more than 2 spaces in your inventory.");
			}
			if(player.getInventory().getFreeSlots() > 1){
			player.getInventory().deleteItem(11910, 1);
			player.getInventory().addItem(7362, 1);
			player.getInventory().addItem(7366, 1);}
		}
		if (itemId == 11908) {// Added in by Google(Kyle)
			if(!(player.getInventory().getFreeSlots() > 1)){
				player.getPackets().sendGameMessage("You need more than 2 spaces in your inventory.");
			}
			if(player.getInventory().getFreeSlots() > 1){
			player.getInventory().deleteItem(11908, 1);
			player.getInventory().addItem(7364, 1);
			player.getInventory().addItem(7368, 1);}
		}
		if (itemId == 11906) {// Added in by Google(Kyle)
			if(!(player.getInventory().getFreeSlots() > 2)){
				player.getPackets().sendGameMessage("You need more than 3 spaces in your inventory.");
			}
			if(player.getInventory().getFreeSlots() > 2){
			player.getInventory().deleteItem(11906, 1);
			player.getInventory().addItem(7394, 1);
			player.getInventory().addItem(7390, 1);
			player.getInventory().addItem(7386, 1);}
		}
		if (itemId == 11904) {// Added in by Google(Kyle)
			if(!(player.getInventory().getFreeSlots() > 2)){
				player.getPackets().sendGameMessage("You need more than 3 spaces in your inventory.");
			}
			if(player.getInventory().getFreeSlots() > 2){
			player.getInventory().deleteItem(11904, 1);
			player.getInventory().addItem(7396, 1);
			player.getInventory().addItem(7392, 1);
			player.getInventory().addItem(7388, 1);}
		}
		if (itemId == 11902) {// Added in by Google(Kyle)
			if(!(player.getInventory().getFreeSlots() > 2)){
				player.getPackets().sendGameMessage("You need more than 3 spaces in your inventory.");
			}
			if(player.getInventory().getFreeSlots() > 2){
			player.getInventory().deleteItem(11902, 1);
			player.getInventory().addItem(7400, 1);
			player.getInventory().addItem(7399, 1);
			player.getInventory().addItem(7398, 1);}
		}
		if (itemId == 11900) {// Added in by Google(Kyle)
			if(!(player.getInventory().getFreeSlots() > 3)){
				player.getPackets().sendGameMessage("You need more than 4 spaces in your inventory.");
			}
			if(player.getInventory().getFreeSlots() > 3){
			player.getInventory().deleteItem(11900, 1);
			player.getInventory().addItem(2619, 1);
			player.getInventory().addItem(2615, 1);
			player.getInventory().addItem(3476, 1);
			player.getInventory().addItem(2621, 1);}
		}
		if (itemId == 11898) {// Added in by Google(Kyle)
			if(!(player.getInventory().getFreeSlots() > 3)){
				player.getPackets().sendGameMessage("You need more than 4 spaces in your inventory.");
			}
			if(player.getInventory().getFreeSlots() > 3){
			player.getInventory().deleteItem(11898, 1);
			player.getInventory().addItem(2619, 1);
			player.getInventory().addItem(2615, 1);
			player.getInventory().addItem(2617, 1);
			player.getInventory().addItem(2621, 1);}
		}
		if (itemId == 11896) {// Added in by Google(Kyle)
			if(!(player.getInventory().getFreeSlots() > 3)){
				player.getPackets().sendGameMessage("You need more than 4 spaces in your inventory.");
			}
			if(player.getInventory().getFreeSlots() > 3){
			player.getInventory().deleteItem(11896, 1);
			player.getInventory().addItem(2627, 1);
			player.getInventory().addItem(2623, 1);
			player.getInventory().addItem(3477, 1);
			player.getInventory().addItem(2629, 1);}
		}
		if (itemId == 11894) {// Added in by Google(Kyle)
			if(!(player.getInventory().getFreeSlots() > 3)){
				player.getPackets().sendGameMessage("You need more than 4 spaces in your inventory.");
			}
			if(player.getInventory().getFreeSlots() > 3){
			player.getInventory().deleteItem(11894, 1);
			player.getInventory().addItem(2627, 1);
			player.getInventory().addItem(2623, 1);
			player.getInventory().addItem(2625, 1);
			player.getInventory().addItem(2629, 1);}
		}
		if (itemId == 11892) {// Added in by Google(Kyle)
			if(!(player.getInventory().getFreeSlots() > 3)){
				player.getPackets().sendGameMessage("You need more than 4 spaces in your inventory.");
			}
			if(player.getInventory().getFreeSlots() > 3){
			player.getInventory().deleteItem(11892, 1);
			player.getInventory().addItem(2613, 1);
			player.getInventory().addItem(2607, 1);
			player.getInventory().addItem(3475, 1);
			player.getInventory().addItem(2611, 1);}
		}
		if (itemId == 11890) {// Added in by Google(Kyle)
			if(!(player.getInventory().getFreeSlots() > 3)){
				player.getPackets().sendGameMessage("You need more than 4 spaces in your inventory.");
			}
			if(player.getInventory().getFreeSlots() > 3){
			player.getInventory().deleteItem(11890, 1);
			player.getInventory().addItem(2613, 1);
			player.getInventory().addItem(2607, 1);
			player.getInventory().addItem(2609, 1);
			player.getInventory().addItem(2611, 1);}
		}
		if (itemId == 11888) {// Added in by Google(Kyle)
			if(!(player.getInventory().getFreeSlots() > 3)){
				player.getPackets().sendGameMessage("You need more than 4 spaces in your inventory.");
			}
			if(player.getInventory().getFreeSlots() > 3){
			player.getInventory().deleteItem(11888, 1);
			player.getInventory().addItem(2605, 1);
			player.getInventory().addItem(2599, 1);
			player.getInventory().addItem(3474, 1);
			player.getInventory().addItem(2603, 1);}
		}
		if (itemId == 11886) {// Added in by Google(Kyle)
			if(!(player.getInventory().getFreeSlots() > 3)){
				player.getPackets().sendGameMessage("You need more than 4 spaces in your inventory.");
			}
			if(player.getInventory().getFreeSlots() > 3){
			player.getInventory().deleteItem(11886, 1);
			player.getInventory().addItem(2605, 1);
			player.getInventory().addItem(2599, 1);
			player.getInventory().addItem(2601, 1);
			player.getInventory().addItem(2603, 1);}
		}
		if (itemId == 11884) {// Added in by Google(Kyle)
			if(!(player.getInventory().getFreeSlots() > 3)){
				player.getPackets().sendGameMessage("You need more than 4 spaces in your inventory.");
			}
			if(player.getInventory().getFreeSlots() > 3){
			player.getInventory().deleteItem(11884, 1);
			player.getInventory().addItem(2595, 1);
			player.getInventory().addItem(2591, 1);
			player.getInventory().addItem(3473, 1);
			player.getInventory().addItem(2597, 1);}
		}
		if (itemId == 11882) {// Added in by Google(Kyle)
			if(!(player.getInventory().getFreeSlots() > 3)){
				player.getPackets().sendGameMessage("You need more than 4 spaces in your inventory.");
			}
			if(player.getInventory().getFreeSlots() > 3){
			player.getInventory().deleteItem(11882, 1);
			player.getInventory().addItem(2595, 1);
			player.getInventory().addItem(2591, 1);
			player.getInventory().addItem(2593, 1);
			player.getInventory().addItem(2597, 1);}
		}
		if (itemId == 11880) {// Added in by Google(Kyle)
			if(!(player.getInventory().getFreeSlots() > 3)){
				player.getPackets().sendGameMessage("You need more than 4 spaces in your inventory.");
			}
			if(player.getInventory().getFreeSlots() > 3){
			player.getInventory().deleteItem(11880, 1);
			player.getInventory().addItem(2587, 1);
			player.getInventory().addItem(2583, 1);
			player.getInventory().addItem(3472, 1);
			player.getInventory().addItem(2589, 1);}
		}
		if (itemId == 11878) {// Added in by Google(Kyle)
			if(!(player.getInventory().getFreeSlots() > 3)){
				player.getPackets().sendGameMessage("You need more than 4 spaces in your inventory.");
			}
			if(player.getInventory().getFreeSlots() > 3){
			player.getInventory().deleteItem(11878, 1);
			player.getInventory().addItem(2587, 1);
			player.getInventory().addItem(2583, 1);
			player.getInventory().addItem(2585, 1);
			player.getInventory().addItem(2589, 1);}
		}
		if (itemId == 11876) {// Added in by Google(Kyle)
			if(!(player.getInventory().getFreeSlots() > 4)){
				player.getPackets().sendGameMessage("You need more than 5 spaces in your inventory.");
			}
			if(player.getInventory().getFreeSlots() > 4){
			player.getInventory().deleteItem(11876, 1);
			player.getInventory().addItem(3385, 1);
			player.getInventory().addItem(3387, 1);
			player.getInventory().addItem(3389, 1);
			player.getInventory().addItem(3391, 1);
			player.getInventory().addItem(3393, 1);}
		}
		if (itemId == 11874) {// Added in by Google(Kyle)
			if(!(player.getInventory().getFreeSlots() > 4)){
				player.getPackets().sendGameMessage("You need more than 5 spaces in your inventory.");
			}
			if(player.getInventory().getFreeSlots() > 4){
			player.getInventory().deleteItem(11874, 1);
			player.getInventory().addItem(6918, 1);
			player.getInventory().addItem(6916, 1);
			player.getInventory().addItem(6924, 1);
			player.getInventory().addItem(6922, 1);
			player.getInventory().addItem(6920, 1);}
		}
		if (itemId == 11872) {// Added in by Google(Kyle)
			if(!(player.getInventory().getFreeSlots() > 3)){
				player.getPackets().sendGameMessage("You need more than 4 spaces in your inventory.");
			}
			if(player.getInventory().getFreeSlots() > 3){
			player.getInventory().deleteItem(11872, 1);
			player.getInventory().addItem(4089, 1);
			player.getInventory().addItem(4091, 1);
			player.getInventory().addItem(4093, 1);
			player.getInventory().addItem(4095, 1);}
		}
		if (itemId == 11870) {// Added in by Google(Kyle)
			if(!(player.getInventory().getFreeSlots() > 3)){
				player.getPackets().sendGameMessage("You need more than 4 spaces in your inventory.");
			}
			if(player.getInventory().getFreeSlots() > 3){
			player.getInventory().deleteItem(11870, 1);
			player.getInventory().addItem(12957, 1);
			player.getInventory().addItem(2503, 1);
			player.getInventory().addItem(2497, 1);
			player.getInventory().addItem(2491, 1);}
		}
		if (itemId == 11868) {// Added in by Google(Kyle)
			if(!(player.getInventory().getFreeSlots() > 3)){
				player.getPackets().sendGameMessage("You need more than 4 spaces in your inventory.");
			}
			if(player.getInventory().getFreeSlots() > 3){
			player.getInventory().deleteItem(11868, 1);
			player.getInventory().addItem(12950, 1);
			player.getInventory().addItem(2501, 1);
			player.getInventory().addItem(2495, 1);
			player.getInventory().addItem(2489, 1);}
		}
		if (itemId == 11866) {// Added in by Google(Kyle)
			if(!(player.getInventory().getFreeSlots() > 3)){
				player.getPackets().sendGameMessage("You need more than 4 spaces in your inventory.");
			}
			if(player.getInventory().getFreeSlots() > 3){
			player.getInventory().deleteItem(11866, 1);
			player.getInventory().addItem(12943, 1);
			player.getInventory().addItem(2499, 1);
			player.getInventory().addItem(2493, 1);
			player.getInventory().addItem(2487, 1);}
		}
		if (itemId == 11864) {// Added in by Google(Kyle)
			if(!(player.getInventory().getFreeSlots() > 3)){
				player.getPackets().sendGameMessage("You need more than 4 spaces in your inventory.");
			}
			if(player.getInventory().getFreeSlots() > 3){
			player.getInventory().deleteItem(11864, 1);
			player.getInventory().addItem(12936, 1);
			player.getInventory().addItem(1135, 1);
			player.getInventory().addItem(1099, 1);
			player.getInventory().addItem(1065, 1);}
		}
		if (itemId == 11862) {// Added in by Google(Kyle)
			if(!(player.getInventory().getFreeSlots() > 3)){
				player.getPackets().sendGameMessage("You need more than 4 spaces in your inventory.");
			}
			if(player.getInventory().getFreeSlots() > 3){
			player.getInventory().deleteItem(11862, 1);
			player.getInventory().addItem(10342, 1);
			player.getInventory().addItem(10338, 1);
			player.getInventory().addItem(10340, 1);
			player.getInventory().addItem(10344, 1);}
		}
		if (itemId == 11860) {// Added in by Google(Kyle)
			if(!(player.getInventory().getFreeSlots() > 3)){
				player.getPackets().sendGameMessage("You need more than 4 spaces in your inventory.");
			}
			if(player.getInventory().getFreeSlots() > 3){
			player.getInventory().deleteItem(11860, 1);
			player.getInventory().addItem(10334, 1);
			player.getInventory().addItem(10330, 1);
			player.getInventory().addItem(10332, 1);
			player.getInventory().addItem(10336, 1);}
		}
		if (itemId == 11858) {// Added in by Google(Kyle)
			if(!(player.getInventory().getFreeSlots() > 3)){
				player.getPackets().sendGameMessage("You need more than 4 spaces in your inventory.");
			}
			if(player.getInventory().getFreeSlots() > 3){
			player.getInventory().deleteItem(11858, 1);
			player.getInventory().addItem(10350, 1);
			player.getInventory().addItem(10348, 1);
			player.getInventory().addItem(10346, 1);
			player.getInventory().addItem(10352, 1);}
		}
		if (itemId == 11856) {// Added in by Google(Kyle)
			if(!(player.getInventory().getFreeSlots() > 3)){
				player.getPackets().sendGameMessage("You need more than 4 spaces in your inventory.");
			}
			if(player.getInventory().getFreeSlots() > 3){
			player.getInventory().deleteItem(11856, 1);
			player.getInventory().addItem(4753, 1);
			player.getInventory().addItem(4757, 1);
			player.getInventory().addItem(4759, 1);
			player.getInventory().addItem(4755, 1);}
		}
		if (itemId == 11854) {// Added in by Google(Kyle)
			if(!(player.getInventory().getFreeSlots() > 3)){
				player.getPackets().sendGameMessage("You need more than 4 spaces in your inventory.");
			}
			if(player.getInventory().getFreeSlots() > 3){
			player.getInventory().deleteItem(11854, 1);
			player.getInventory().addItem(4745, 1);
			player.getInventory().addItem(4749, 1);
			player.getInventory().addItem(4751, 1);
			player.getInventory().addItem(4747, 1);}
		}
		if (itemId == 11852) {// Added in by Google(Kyle)
			if(!(player.getInventory().getFreeSlots() > 3)){
				player.getPackets().sendGameMessage("You need more than 4 spaces in your inventory.");
			}
			if(player.getInventory().getFreeSlots() > 3){
			player.getInventory().deleteItem(11852, 1);
			player.getInventory().addItem(4732, 1);
			player.getInventory().addItem(4736, 1);
			player.getInventory().addItem(4738, 1);
			player.getInventory().addItem(4734, 1);}
		}
		if (itemId == 11850) {// Added in by Google(Kyle)
			if(!(player.getInventory().getFreeSlots() > 3)){
				player.getPackets().sendGameMessage("You need more than 4 spaces in your inventory.");
			}
			if(player.getInventory().getFreeSlots() > 3){
			player.getInventory().deleteItem(11850, 1);
			player.getInventory().addItem(4724, 1);
			player.getInventory().addItem(4728, 1);
			player.getInventory().addItem(4730, 1);
			player.getInventory().addItem(4726, 1);}
		}
		if (itemId == 11848) {// Added in by Google(Kyle)
			if(!(player.getInventory().getFreeSlots() > 3)){
				player.getPackets().sendGameMessage("You need more than 4 spaces in your inventory.");
			}
			if(player.getInventory().getFreeSlots() > 3){
			player.getInventory().deleteItem(11848, 1);
			player.getInventory().addItem(4716, 1);
			player.getInventory().addItem(4720, 1);
			player.getInventory().addItem(4722, 1);
			player.getInventory().addItem(4718, 1);}
		}
		if (itemId == 11846) {// Added in by Google(Kyle)
			if(!(player.getInventory().getFreeSlots() > 3)){
				player.getPackets().sendGameMessage("You need more than 4 spaces in your inventory.");
			}
			if(player.getInventory().getFreeSlots() > 3){
			player.getInventory().deleteItem(11846, 1);
			player.getInventory().addItem(4708, 1);
			player.getInventory().addItem(4712, 1);
			player.getInventory().addItem(4714, 1);
			player.getInventory().addItem(4710, 1);}
		}
		if (itemId == 11844) {// Added in by Google(Kyle)
			if(!(player.getInventory().getFreeSlots() > 3)){
				player.getPackets().sendGameMessage("You need more than 4 spaces in your inventory.");
			}
			if(player.getInventory().getFreeSlots() > 3){
			player.getInventory().deleteItem(11844, 1);
			player.getInventory().addItem(1149, 1);
			player.getInventory().addItem(3140, 1);
			player.getInventory().addItem(4585, 1);
			player.getInventory().addItem(1187, 1);}
		}
		if (itemId == 11842) {// Added in by Google(Kyle)
			if(!(player.getInventory().getFreeSlots() > 3)){
				player.getPackets().sendGameMessage("You need more than 4 spaces in your inventory.");
			}
			if(player.getInventory().getFreeSlots() > 3){
			player.getInventory().deleteItem(11842, 1);
			player.getInventory().addItem(1149, 1);
			player.getInventory().addItem(3140, 1);
			player.getInventory().addItem(4087, 1);
			player.getInventory().addItem(1187, 1);}
		}
		if (itemId == 11838) {// Added in by Google(Kyle)
			if(!(player.getInventory().getFreeSlots() > 3)){
				player.getPackets().sendGameMessage("You need more than 4 spaces in your inventory.");
			}
			if(player.getInventory().getFreeSlots() > 3){
			player.getInventory().deleteItem(11838, 1);
			player.getInventory().addItem(1163, 1);
			player.getInventory().addItem(1127, 1);
			player.getInventory().addItem(1079, 1);
			player.getInventory().addItem(1201, 1);}
		}
		if (itemId == 11840) {// Added in by Google(Kyle)
			if(!(player.getInventory().getFreeSlots() > 3)){
				player.getPackets().sendGameMessage("You need more than 4 spaces in your inventory.");
			}
			if(player.getInventory().getFreeSlots() > 3){
			player.getInventory().deleteItem(11840, 1);
			player.getInventory().addItem(1163, 1);
			player.getInventory().addItem(1127, 1);
			player.getInventory().addItem(1093, 1);
			player.getInventory().addItem(1201, 1);}
		}
		if (itemId == 11834) {// Added in by Google(Kyle)
			if(!(player.getInventory().getFreeSlots() > 3)){
				player.getPackets().sendGameMessage("You need more than 4 spaces in your inventory.");
			}
			if(player.getInventory().getFreeSlots() > 3){
			player.getInventory().deleteItem(11834, 1);
			player.getInventory().addItem(1161, 1);
			player.getInventory().addItem(1123, 1);
			player.getInventory().addItem(1073, 1);
			player.getInventory().addItem(1199, 1);}
		}
		if (itemId == 11836) {// Added in by Google(Kyle)
			if(!(player.getInventory().getFreeSlots() > 3)){
				player.getPackets().sendGameMessage("You need more than 4 spaces in your inventory.");
			}
			if(player.getInventory().getFreeSlots() > 3){
			player.getInventory().deleteItem(11836, 1);
			player.getInventory().addItem(1161, 1);
			player.getInventory().addItem(1123, 1);
			player.getInventory().addItem(1091, 1);
			player.getInventory().addItem(1199, 1);
		}}
		if (itemId == 11830) {// Added in by Google(Kyle)
			if(!(player.getInventory().getFreeSlots() > 3)){
				player.getPackets().sendGameMessage("You need more than 4 spaces in your inventory.");
			}
			if(player.getInventory().getFreeSlots() > 3){
			player.getInventory().deleteItem(11830, 1);
			player.getInventory().addItem(1159, 1);
			player.getInventory().addItem(1121, 1);
			player.getInventory().addItem(1071, 1);
			player.getInventory().addItem(1197, 1);}
		}
		if (itemId == 11832) {// Added in by Google(Kyle)
			if(!(player.getInventory().getFreeSlots() > 3)){
				player.getPackets().sendGameMessage("You need more than 4 spaces in your inventory.");
			}
			if(player.getInventory().getFreeSlots() > 3){
			player.getInventory().deleteItem(11832, 1);
			player.getInventory().addItem(1159, 1);
			player.getInventory().addItem(1121, 1);
			player.getInventory().addItem(1085, 1);
			player.getInventory().addItem(1197, 1);}
		}
		if (itemId == 11826) {// Added in by Google(Kyle)
			if(!(player.getInventory().getFreeSlots() > 3)){
				player.getPackets().sendGameMessage("You need more than 4 spaces in your inventory.");
			}
			if(player.getInventory().getFreeSlots() > 3){
			player.getInventory().deleteItem(11826, 1);
			player.getInventory().addItem(1165, 1);
			player.getInventory().addItem(1125, 1);
			player.getInventory().addItem(1077, 1);
			player.getInventory().addItem(1195, 1);}
		}
		if (itemId == 11828) {// Added in by Google(Kyle)
			if(!(player.getInventory().getFreeSlots() > 3)){
				player.getPackets().sendGameMessage("You need more than 4 spaces in your inventory.");
			}
			if(player.getInventory().getFreeSlots() > 3){
			player.getInventory().deleteItem(11828, 1);
			player.getInventory().addItem(1165, 1);
			player.getInventory().addItem(1125, 1);
			player.getInventory().addItem(1089, 1);
			player.getInventory().addItem(1195, 1);}
		}
		if (itemId == 11822) {// Added in by Google(Kyle)
			if(!(player.getInventory().getFreeSlots() > 3)){
				player.getPackets().sendGameMessage("You need more than 4 spaces in your inventory.");
			}
			if(player.getInventory().getFreeSlots() > 3){
			player.getInventory().deleteItem(11822, 1);
			player.getInventory().addItem(1157, 1);
			player.getInventory().addItem(1119, 1);
			player.getInventory().addItem(1069, 1);
			player.getInventory().addItem(1193, 1);}
		}
		if (itemId == 11824) {// Added in by Google(Kyle)
			if(!(player.getInventory().getFreeSlots() > 3)){
				player.getPackets().sendGameMessage("You need more than 4 spaces in your inventory.");
			}
			if(player.getInventory().getFreeSlots() > 3){
			player.getInventory().deleteItem(11824, 1);
			player.getInventory().addItem(1157, 1);
			player.getInventory().addItem(1119, 1);
			player.getInventory().addItem(1083, 1);
			player.getInventory().addItem(1193, 1);}
		}
		if (itemId == 11818) {// Added in by Google(Kyle)
			if(!(player.getInventory().getFreeSlots() > 3)){
				player.getPackets().sendGameMessage("You need more than 4 spaces in your inventory.");
			}
			if(player.getInventory().getFreeSlots() > 3){
			player.getInventory().deleteItem(11818, 1);
			player.getInventory().addItem(1153, 1);
			player.getInventory().addItem(1115, 1);
			player.getInventory().addItem(1067, 1);
			player.getInventory().addItem(1191, 1);}
		}
		if (itemId == 11820) {// Added in by Google(Kyle)
			if(!(player.getInventory().getFreeSlots() > 3)){
				player.getPackets().sendGameMessage("You need more than 4 spaces in your inventory.");
			}
			if(player.getInventory().getFreeSlots() > 3){
			player.getInventory().deleteItem(11820, 1);
			player.getInventory().addItem(1153, 1);
			player.getInventory().addItem(1115, 1);
			player.getInventory().addItem(1081, 1);
			player.getInventory().addItem(1191, 1);}
		}
		if (itemId == 11814) {// Added in by Google(Kyle)
			if(!(player.getInventory().getFreeSlots() > 3)){
				player.getPackets().sendGameMessage("You need more than 4 spaces in your inventory.");
			}
			if(player.getInventory().getFreeSlots() > 3){
			player.getInventory().deleteItem(11814, 1);
			player.getInventory().addItem(1155, 1);
			player.getInventory().addItem(1117, 1);
			player.getInventory().addItem(1075, 1);
			player.getInventory().addItem(1189, 1);}
		}
		if (itemId == 11816) {// Added in by Google(Kyle)
			if(!(player.getInventory().getFreeSlots() > 3)){
				player.getPackets().sendGameMessage("You need more than 4 spaces in your inventory.");
			}
			if(player.getInventory().getFreeSlots() > 3){
			player.getInventory().deleteItem(11816, 1);
			player.getInventory().addItem(1155, 1);
			player.getInventory().addItem(1117, 1);
			player.getInventory().addItem(1087, 1);
			player.getInventory().addItem(1189, 1);}
		}
		if(itemId == 6891){
			player.getDialogueManager().startDialogue("NpcItem");
		}
		/**
		 * 
		 * Multicannon setup.
		 * 
		 */
		if (itemId == 6)
			player.getDwarfCannon().cannonSetup();
		if (itemId == 20494)
			player.getGoldDwarfCannon().GoldcannonSetup();
		if (itemId == 20498)
			player.getRoyaleDwarfCannon().RoyalecannonSetup();
		else if (itemId == 1856) {// Information Book
			player.getInterfaceManager().sendInterface(275);
			player.getPackets()
					.sendIComponentText(275, 1, Settings.SERVER_NAME);
			player.getPackets().sendIComponentText(275, 10, "");
			player.getPackets().sendIComponentText(275, 11, "");
			player.getPackets().sendIComponentText(275, 12,
					"Welcome to " + Settings.SERVER_NAME + ".");
			player.getPackets().sendIComponentText(275, 13,
					"Xiduth is currently an economy server.");
			player.getPackets()
					.sendIComponentText(275, 14,
							"Use the teleport crystal to navigate yourself throughout Xiduth.");
			player.getPackets().sendIComponentText(275, 15, "");
			player.getPackets().sendIComponentText(275, 16,
					"You can change your prayers and spells at home.");
			player.getPackets().sendIComponentText(275, 17,
					"Need help? Type ::ticket to get help by a staff member.");
			player.getPackets().sendIComponentText(275, 18, "");
			player.getPackets().sendIComponentText(275, 19,
					"Feel free to ::vote to help us get more popular too!");
			player.getPackets().sendIComponentText(275, 20, "");
			player.getPackets().sendIComponentText(275, 21,
					"Website: " + Settings.WEBSITE_LINK);
			player.getPackets().sendIComponentText(275, 22, "");
			player.getPackets().sendIComponentText(275, 23,
					"Enjoy your stay on " + Settings.SERVER_NAME + ".");
			player.getPackets().sendIComponentText(275, 24,
					"<img=1> Xiduth Staff Team");
			for (int i = 25; i < 310; i++)
				player.getPackets().sendIComponentText(275, i, "");
		} else if (itemId == HunterEquipment.BOX.getId()) // almost done
			player.getActionManager().setAction(
					new BoxAction(HunterEquipment.BOX));
		else if (itemId == HunterEquipment.BRID_SNARE.getId())
			player.getActionManager().setAction(
					new BoxAction(HunterEquipment.BRID_SNARE));
		else if (item.getDefinitions().getName().startsWith("Burnt"))
			player.getDialogueManager().startDialogue("SimplePlayerMessage",
					"Ugh, this is inedible.");

		if (Settings.DEBUG)
			Logger.log("ItemHandler", "Item Select:" + itemId + ", Slot Id:"
					+ slotId);
	}

	/*
	 * returns the other
	 */
	public static Item contains(int id1, Item item1, Item item2) {
		if (item1.getId() == id1)
			return item2;
		if (item2.getId() == id1)
			return item1;
		return null;
	}

	public static boolean contains(int id1, int id2, Item... items) {
		boolean containsId1 = false;
		boolean containsId2 = false;
		for (Item item : items) {
			if (item.getId() == id1)
				containsId1 = true;
			else if (item.getId() == id2)
				containsId2 = true;
		}
		return containsId1 && containsId2;
	}

	public static void handleItemOnItem(final Player player, InputStream stream) {
		int itemUsedWithId = stream.readShort();
		int toSlot = stream.readShortLE128();
		int hash1 = stream.readInt();
		int hash2 = stream.readInt();
		int interfaceId = hash1 >> 16;
		int interfaceId2 = hash2 >> 16;
		int comp1 = hash1 & 0xFFFF;
		int fromSlot = stream.readShort();
		int itemUsedId = stream.readShortLE128();
		if (interfaceId == 192 && interfaceId2 == 679) {
		    MagicOnItem.handleMagic(player, comp1, player.getInventory().getItem(toSlot));
		    return;
		}
		if ((interfaceId2 == 747 || interfaceId2 == 662)
				&& interfaceId == Inventory.INVENTORY_INTERFACE) {
			if (player.getFamiliar() != null) {
				player.getFamiliar().setSpecial(true);
				if (player.getFamiliar().getSpecialAttack() == SpecialAttack.ITEM) {
					if (player.getFamiliar().hasSpecialOn())
						player.getFamiliar().submitSpecial(toSlot);
				}
			}
			return;
		}
		if (interfaceId == Inventory.INVENTORY_INTERFACE
				&& interfaceId == interfaceId2
				&& !player.getInterfaceManager().containsInventoryInter()) {
			if (toSlot >= 28 || fromSlot >= 28)
				return;
			Item usedWith = player.getInventory().getItem(toSlot);
			Item itemUsed = player.getInventory().getItem(fromSlot);
			if (itemUsed == null || usedWith == null
					|| itemUsed.getId() != itemUsedId
					|| usedWith.getId() != itemUsedWithId)
				return;
			player.stopAll();
			if (!player.getControlerManager().canUseItemOnItem(itemUsed,
					usedWith))
				return;
			Fletch fletch = Fletching.isFletching(usedWith, itemUsed);
			if (fletch != null) {
				player.getDialogueManager().startDialogue("FletchingD", fletch);
				return;
			}
			int herblore = Herblore.isHerbloreSkill(itemUsed, usedWith);
			if (herblore > -1) {
				player.getDialogueManager().startDialogue("HerbloreD",
						herblore, itemUsed, usedWith);
				return;
			}
			if (itemUsed.getId() == 985 || usedWith.getId() == 987) {
				CrystalChest.makeKey(player);
			}
			if (itemUsed.getId() == 987 || usedWith.getId() == 985) {
				CrystalChest.makeKey(player);
			}
			if (itemUsed.getId() == 11710 || usedWith.getId() == 11712
					|| usedWith.getId() == 11714) {
				if (player.getInventory().containsItem(11710, 1)
						&& player.getInventory().containsItem(11712, 1)
						&& player.getInventory().containsItem(11714, 1)) {
					player.getInventory().deleteItem(11710, 1);
					player.getInventory().deleteItem(11712, 1);
					player.getInventory().deleteItem(11714, 1);
					player.getInventory().addItem(11690, 1);
					player.getPackets().sendGameMessage(
							"You made a godsword blade.");
				}
			}
			if (itemUsed.getId() == 11690 || usedWith.getId() == 11702) {
				if (player.getInventory().containsItem(11690, 1)
						&& player.getInventory().containsItem(11702, 1)) {
					player.getInventory().deleteItem(11690, 1);
					player.getInventory().deleteItem(11702, 1);
					player.getInventory().addItem(11694, 1);
					player.getPackets()
							.sendGameMessage(
									"You attach the hilt to the blade and make an Armadyl godsword.");
				}
			}
			if (itemUsed.getId() == 21775 || usedWith.getId() == 1391) {
				if (player.getInventory().containsItem(21775, 1)
						&& player.getInventory().containsItem(1391, 1)) {
					player.getInventory().deleteItem(21775, 1);
					player.getInventory().deleteItem(1391, 1);
					player.getInventory().addItem(21777, 1);
					player.getPackets()
							.sendGameMessage(
									"You attach the orb to your battlestaff and make an Armadyl battlestaff.");
				}
			}
			if (itemUsed.getId() == 23691 || usedWith.getId() == 11235) {
				if (player.getInventory().containsItem(23691, 1)
						&& player.getInventory().containsItem(11235, 1)) {
					player.getInventory().deleteItem(23691, 1);
					player.getInventory().deleteItem(11235, 1);
					player.getInventory().addItem(15701, 1);
					for (Player players : World.getPlayers()) {
						if (players == null)
							continue;
						players.getPackets()
								.sendGameMessage(
										"<img=5><col=ff0000>"
												+ player.getDisplayName()
												+ "</col> has created a <col=ff0000>Dark bow</col>.");
					}
				}
			}
			if (itemUsed.getId() == 23695 || usedWith.getId() == 15701) { // fixed
				if (player.getInventory().containsItem(23695, 1)
						&& player.getInventory().containsItem(15701, 1)) {
					player.getInventory().deleteItem(23695, 1);
					player.getInventory().deleteItem(15701, 1);
					player.getInventory().addItem(15703, 1);
					for (Player players : World.getPlayers()) {
						if (players == null)
							continue;
						players.getPackets()
								.sendGameMessage(
										"<img=5><col=ff0000>"
												+ player.getDisplayName()
												+ "</col> has created an <col=ff0000>Enchanted Dark bow</col>.");
					}
				}
			}
			if (itemUsed.getId() == 15703 || usedWith.getId() == 15701) {
				if (player.getInventory().containsItem(15703, 1)
						&& player.getInventory().containsItem(15701, 1)) {
					player.getInventory().deleteItem(15703, 1);
					player.getInventory().deleteItem(15701, 1);
					player.getInventory().addItem(19630, 1);
					for (Player players : World.getPlayers()) {
						if (players == null)
							continue;
						players.getPackets()
								.sendGameMessage(
										"<img=5><col=ff0000>"
												+ player.getDisplayName()
												+ "</col> has created <col=ff0000>Uric liquid</col>.");
					}
				}
			}
			if (itemUsed.getId() == 19630 || usedWith.getId() == 15703) {
				if (player.getInventory().containsItem(19630, 1)
						&& player.getInventory().containsItem(15703, 1)) {
					player.getInventory().deleteItem(19630, 1);
					player.getInventory().deleteItem(15703, 1);
					player.getInventory().addItem(24456, 1);
					for (Player players : World.getPlayers()) {
						if (players == null)
							continue;
						players.getPackets()
								.sendGameMessage(
										"<img=5><col=ff0000>"
												+ player.getDisplayName()
												+ "</col> has created a <col=ff0000>Decimation</col>.");
					}
				}
			}
			if (itemUsed.getId() == 19630 || usedWith.getId() == 18355) {
				if (player.getInventory().containsItem(19630, 1)
						&& player.getInventory().containsItem(18355, 1)) {
					player.getInventory().deleteItem(19630, 1);
					player.getInventory().deleteItem(18355, 1);
					player.getInventory().addItem(24457, 1);
					for (Player players : World.getPlayers()) {
						if (players == null)
							continue;
						players.getPackets()
								.sendGameMessage(
										"<img=5><col=ff0000>"
												+ player.getDisplayName()
												+ "</col> has created an <col=ff0000>Oblieration</col>.");
					}
				}
			}
			if (itemUsed.getId() == 11690 || usedWith.getId() == 11704) {
				if (player.getInventory().containsItem(11690, 1)
						&& player.getInventory().containsItem(11704, 1)) {
					player.getInventory().deleteItem(11690, 1);
					player.getInventory().deleteItem(11704, 1);
					player.getInventory().addItem(11696, 1);
					player.getPackets()
							.sendGameMessage(
									"You attach the hilt to the blade and make an Bandos godsword.");
				}
			}
			if (itemUsed.getId() == 11690 || usedWith.getId() == 11706) {
				if (player.getInventory().containsItem(11690, 1)
						&& player.getInventory().containsItem(11706, 1)) {
					player.getInventory().deleteItem(11690, 1);
					player.getInventory().deleteItem(11706, 1);
					player.getInventory().addItem(11698, 1);
					player.getPackets()
							.sendGameMessage(
									"You attach the hilt to the blade and make an Saradomin godsword.");
				}
			}
			if (itemUsed.getId() == 554 || usedWith.getId() == 22448
					|| usedWith.getId() == 22498) {
				if (player.getInventory().containsItem(554, 15000)
						&& player.getInventory().containsItem(22448, 3000)
						&& player.getInventory().containsItem(22498, 1)) {
					player.getInventory().deleteItem(554, 15000);
					player.getInventory().deleteItem(22448, 3000);
					player.getInventory().deleteItem(22498, 1);
					player.getInventory().addItem(22494, 1);
					player.getPackets()
							.sendGameMessage(
									"You combine the spores and fire runes to the stick and make a Polypore Staff.");
				}
			}
			if (itemUsed.getId() == 22452 || usedWith.getId() == 22451) {
				if (player.getInventory().containsItem(22452, 1)
						&& player.getInventory().containsItem(22451, 500)) {
					player.getInventory().deleteItem(22452, 1);
					player.getInventory().deleteItem(22451, 500);
					player.getInventory().addItem(22482, 1);
					player.getPackets()
							.sendGameMessage(
									"You combine the flakes to the mycelium visor web and make a Ganodermic Visor.");
				}
			}
			if (itemUsed.getId() == 22456 || usedWith.getId() == 22451) {
				if (player.getInventory().containsItem(22456, 1)
						&& player.getInventory().containsItem(22451, 5000)) {
					player.getInventory().deleteItem(22456, 1);
					player.getInventory().deleteItem(22451, 5000);
					player.getInventory().addItem(22490, 1);
					player.getPackets()
							.sendGameMessage(
									"You combine the flakes to the mycelium poncho web and make a Ganodermic Poncho.");
				}
			}

			if (itemUsed.getId() == 22454 || usedWith.getId() == 22451) {
				if (player.getInventory().containsItem(22454, 1)
						&& player.getInventory().containsItem(22451, 1500)) {
					player.getInventory().deleteItem(22454, 1);
					player.getInventory().deleteItem(22451, 1500);
					player.getInventory().addItem(22486, 1);
					player.getPackets()
							.sendGameMessage(
									"You combine the flakes to the mycelium leggings web and make a Ganodermic Leggings.");
				}
			}
			if (itemUsed.getId() == 1785 || usedWith.getId() == 1775) {
				if (player.getSkills().getLevelForXp(Skills.CRAFTING) < 81) {
					player.getPackets().sendGameMessage(
							"You need a Crafting level of 81 to do this.");
					return;
				}
				if (player.getInventory().containsItem(1785, 1)
						&& player.getInventory().containsItem(1775, 1)) {
					player.getInventory().deleteItem(1775, 1);
					player.getInventory().addItem(23191, 1);
					player.getPackets().sendGameMessage(
							"You craft a Empty Potion Flask.");
				}
			}

			if (itemUsed.getId() == 11690 || usedWith.getId() == 11708) {
				if (player.getInventory().containsItem(11690, 1)
						&& player.getInventory().containsItem(11708, 1)) {
					player.getInventory().deleteItem(11690, 1);
					player.getInventory().deleteItem(11708, 1);
					player.getInventory().addItem(11700, 1);
					player.getPackets()
							.sendGameMessage(
									"You attach the hilt to the blade and make an Zamorak godsword.");
				}
			}
			if (itemUsed.getId() == 13754 || usedWith.getId() == 13734) {
				if (player.getInventory().containsItem(13754, 1)
						&& player.getInventory().containsItem(13734, 1)) {
					player.getInventory().deleteItem(13754, 1);
					player.getInventory().deleteItem(13734, 1);
					player.getInventory().addItem(13736, 1);
					player.getPackets().sendGameMessage(
							"You pour the elixir on the spirit shield.");
				}
			}
			if (itemUsed.getId() == 13746 || usedWith.getId() == 13736) {
				if (player.getInventory().containsItem(13736, 1)
						&& player.getInventory().containsItem(13746, 1)) {
					player.getInventory().deleteItem(13736, 1);
					player.getInventory().deleteItem(13746, 1);
					player.getInventory().addItem(13738, 1);
					player.getPackets()
							.sendGameMessage(
									"You combine the sigil to the blessed spirit shield.");
				}
			}
			if (itemUsed.getId() == 13748 || usedWith.getId() == 13736) {
				if (player.getInventory().containsItem(13736, 1)
						&& player.getInventory().containsItem(13748, 1)) {
					player.getInventory().deleteItem(13736, 1);
					player.getInventory().deleteItem(13748, 1);
					player.getInventory().addItem(13740, 1);
					player.getPackets()
							.sendGameMessage(
									"You combine the sigil to the blessed spirit shield.");
				}
			}
			if (itemUsed.getId() == 13750 || usedWith.getId() == 13736) {
				if (player.getInventory().containsItem(13736, 1)
						&& player.getInventory().containsItem(13750, 1)) {
					player.getInventory().deleteItem(13736, 1);
					player.getInventory().deleteItem(13750, 1);
					player.getInventory().addItem(13742, 1);
					player.getPackets()
							.sendGameMessage(
									"You combine the sigil to the blessed spirit shield.");
				}
			}
			if (usedWith.getId() == 13752 || usedWith.getId() == 13736) {
				if (player.getInventory().containsItem(13736, 1)
						&& player.getInventory().containsItem(13752, 1)) {
					player.getInventory().deleteItem(13736, 1);
					player.getInventory().deleteItem(13752, 1);
					player.getInventory().addItem(13744, 1);
					player.getPackets()
							.sendGameMessage(
									"You combine the sigil to the blessed spirit shield.");
				}
			}
			if (usedWith.getId() == 21369 || usedWith.getId() == 4151) {
				if (player.getInventory().containsItem(21369, 1)
						&& player.getInventory().containsItem(4151, 1)) {
					player.getInventory().deleteItem(21369, 1);
					player.getInventory().deleteItem(4151, 1);
					player.getInventory().addItem(21371, 1);
					player.getPackets().sendGameMessage(
							"You attach the whip vine onto the abyssal whip.");
				}
			}
			if (usedWith.getId() == 11286 || usedWith.getId() == 1540) {
				if (player.getInventory().containsItem(11286, 1)
						&& player.getInventory().containsItem(1540, 1)) {
					player.getInventory().deleteItem(11286, 1);
					player.getInventory().deleteItem(1540, 1);
					player.getInventory().addItem(11283, 1);
					player.getPackets().sendGameMessage(
							"You attach the visage to the anti-fire shield.");
				}
			}

			/**
			 * Flask Making
			 */

			// Attack (4)
			if (usedWith.getId() == 121 || usedWith.getId() == 23191) {
				if (player.getInventory().containsItem(121, 1)
						&& player.getInventory().containsItem(23191, 1)) {
					player.getInventory().deleteItem(121, 1);
					player.getInventory().deleteItem(23191, 1);
					player.getInventory().addItem(23201, 1);
				}
			}
			// Attack (3)
			if (usedWith.getId() == 121 || usedWith.getId() == 23191) {
				if (player.getInventory().containsItem(121, 1)
						&& player.getInventory().containsItem(23191, 1)) {
					player.getInventory().deleteItem(121, 1);
					player.getInventory().deleteItem(23191, 1);
					player.getInventory().addItem(23201, 1);
				}
			}
			// Attack (2)
			if (usedWith.getId() == 123 || usedWith.getId() == 23191) {
				if (player.getInventory().containsItem(123, 1)
						&& player.getInventory().containsItem(23191, 1)) {
					player.getInventory().deleteItem(123, 1);
					player.getInventory().deleteItem(23191, 1);
					player.getInventory().addItem(23203, 1);
				}
			}
			// Attack (1)
			if (usedWith.getId() == 125 || usedWith.getId() == 23191) {
				if (player.getInventory().containsItem(125, 1)
						&& player.getInventory().containsItem(23191, 1)) {
					player.getInventory().deleteItem(125, 1);
					player.getInventory().deleteItem(23191, 1);
					player.getInventory().addItem(23205, 1);
				}
			}
			// Super Attack (1) into Super Attack Flask (5)
			if (usedWith.getId() == 149 || usedWith.getId() == 23257) {
				if (player.getInventory().containsItem(149, 1)
						&& player.getInventory().containsItem(23257, 1)) {
					player.getInventory().deleteItem(149, 1);
					player.getInventory().deleteItem(23257, 1);
					player.getInventory().addItem(229, 1);
					player.getInventory().addItem(23255, 1);
				}
			}
			// Super Attack (1) into Super Attack Flask (4)
			if (usedWith.getId() == 149 || usedWith.getId() == 23259) {
				if (player.getInventory().containsItem(149, 1)
						&& player.getInventory().containsItem(23259, 1)) {
					player.getInventory().deleteItem(149, 1);
					player.getInventory().deleteItem(23259, 1);
					player.getInventory().addItem(229, 1);
					player.getInventory().addItem(23257, 1);
				}
			}
			// Super Attack (1) into Super Attack Flask (3)
			if (usedWith.getId() == 149 || usedWith.getId() == 23261) {
				if (player.getInventory().containsItem(149, 1)
						&& player.getInventory().containsItem(23261, 1)) {
					player.getInventory().deleteItem(149, 1);
					player.getInventory().deleteItem(23261, 1);
					player.getInventory().addItem(229, 1);
					player.getInventory().addItem(23259, 1);
				}
			}
			// Super Attack (1) into Super Attack Flask (2)
			if (usedWith.getId() == 149 || usedWith.getId() == 23263) {
				if (player.getInventory().containsItem(149, 1)
						&& player.getInventory().containsItem(23263, 1)) {
					player.getInventory().deleteItem(149, 1);
					player.getInventory().deleteItem(23263, 1);
					player.getInventory().addItem(229, 1);
					player.getInventory().addItem(23261, 1);
				}
			}
			// Super Attack (1) into Super Attack Flask (1)
			if (usedWith.getId() == 149 || usedWith.getId() == 23265) {
				if (player.getInventory().containsItem(149, 1)
						&& player.getInventory().containsItem(23265, 1)) {
					player.getInventory().deleteItem(149, 1);
					player.getInventory().deleteItem(23265, 1);
					player.getInventory().addItem(229, 1);
					player.getInventory().addItem(23263, 1);
				}
			}
			// Super Attack (2) into Super Attack Flask (5)
			if (usedWith.getId() == 147 || usedWith.getId() == 23257) {
				if (player.getInventory().containsItem(147, 1)
						&& player.getInventory().containsItem(23257, 1)) {
					player.getInventory().deleteItem(147, 1);
					player.getInventory().deleteItem(23257, 1);
					player.getInventory().addItem(149, 1);
					player.getInventory().addItem(23255, 1);
				}
			}
			// Super Attack (2) into Super Attack Flask (4)
			if (usedWith.getId() == 147 || usedWith.getId() == 23259) {
				if (player.getInventory().containsItem(147, 1)
						&& player.getInventory().containsItem(23259, 1)) {
					player.getInventory().deleteItem(147, 1);
					player.getInventory().deleteItem(23259, 1);
					player.getInventory().addItem(229, 1);
					player.getInventory().addItem(23255, 1);
				}
			}
			// Super Attack (2) into Super Attack Flask (3)
			if (usedWith.getId() == 147 || usedWith.getId() == 23261) {
				if (player.getInventory().containsItem(147, 1)
						&& player.getInventory().containsItem(23261, 1)) {
					player.getInventory().deleteItem(147, 1);
					player.getInventory().deleteItem(23261, 1);
					player.getInventory().addItem(229, 1);
					player.getInventory().addItem(23257, 1);
				}
			}
			// Super Attack (2) into Super Attack Flask (2)
			if (usedWith.getId() == 147 || usedWith.getId() == 23263) {
				if (player.getInventory().containsItem(147, 1)
						&& player.getInventory().containsItem(23263, 1)) {
					player.getInventory().deleteItem(147, 1);
					player.getInventory().deleteItem(23263, 1);
					player.getInventory().addItem(229, 1);
					player.getInventory().addItem(23259, 1);
				}
			}
			// Super Attack (2) into Super Attack Flask (1)
			if (usedWith.getId() == 147 || usedWith.getId() == 23265) {
				if (player.getInventory().containsItem(147, 1)
						&& player.getInventory().containsItem(23265, 1)) {
					player.getInventory().deleteItem(147, 1);
					player.getInventory().deleteItem(23265, 1);
					player.getInventory().addItem(229, 1);
					player.getInventory().addItem(23261, 1);
				}
			}
			// Super Attack (3) into Super Attack Flask (5)
			if (usedWith.getId() == 145 || usedWith.getId() == 23257) {
				if (player.getInventory().containsItem(145, 1)
						&& player.getInventory().containsItem(23257, 1)) {
					player.getInventory().deleteItem(145, 1);
					player.getInventory().deleteItem(23257, 1);
					player.getInventory().addItem(147, 1);
					player.getInventory().addItem(23255, 1);
				}
			}
			// Super Attack (3) into Super Attack Flask (4)
			if (usedWith.getId() == 145 || usedWith.getId() == 23259) {
				if (player.getInventory().containsItem(145, 1)
						&& player.getInventory().containsItem(23259, 1)) {
					player.getInventory().deleteItem(145, 1);
					player.getInventory().deleteItem(23259, 1);
					player.getInventory().addItem(149, 1);
					player.getInventory().addItem(23255, 1);
				}
			}
			// Super Attack (3) into Super Attack Flask (3)
			if (usedWith.getId() == 145 || usedWith.getId() == 23261) {
				if (player.getInventory().containsItem(145, 1)
						&& player.getInventory().containsItem(23261, 1)) {
					player.getInventory().deleteItem(145, 1);
					player.getInventory().deleteItem(23261, 1);
					player.getInventory().addItem(229, 1);
					player.getInventory().addItem(23255, 1);
				}
			}
			// Super Attack (3) into Super Attack Flask (2)
			if (usedWith.getId() == 145 || usedWith.getId() == 23263) {
				if (player.getInventory().containsItem(145, 1)
						&& player.getInventory().containsItem(23263, 1)) {
					player.getInventory().deleteItem(145, 1);
					player.getInventory().deleteItem(23263, 1);
					player.getInventory().addItem(229, 1);
					player.getInventory().addItem(23257, 1);
				}
			}
			// Super Attack (3) into Super Attack Flask (1)
			if (usedWith.getId() == 145 || usedWith.getId() == 23265) {
				if (player.getInventory().containsItem(145, 1)
						&& player.getInventory().containsItem(23265, 1)) {
					player.getInventory().deleteItem(145, 1);
					player.getInventory().deleteItem(23265, 1);
					player.getInventory().addItem(229, 1);
					player.getInventory().addItem(23259, 1);
				}
			}
			// Super Attack (4) into Super Attack Flask (5)
			if (usedWith.getId() == 2436 || usedWith.getId() == 23257) {
				if (player.getInventory().containsItem(2436, 1)
						&& player.getInventory().containsItem(23257, 1)) {
					player.getInventory().deleteItem(2436, 1);
					player.getInventory().deleteItem(23257, 1);
					player.getInventory().addItem(145, 1);
					player.getInventory().addItem(23255, 1);
				}
			}
			// Super Attack (4) into Super Attack Flask (4)
			if (usedWith.getId() == 2436 || usedWith.getId() == 23259) {
				if (player.getInventory().containsItem(2436, 1)
						&& player.getInventory().containsItem(23259, 1)) {
					player.getInventory().deleteItem(2436, 1);
					player.getInventory().deleteItem(23259, 1);
					player.getInventory().addItem(147, 1);
					player.getInventory().addItem(23255, 1);
				}
			}
			// Super Attack (4) into Super Attack Flask (3)
			if (usedWith.getId() == 2436 || usedWith.getId() == 23261) {
				if (player.getInventory().containsItem(2436, 1)
						&& player.getInventory().containsItem(23261, 1)) {
					player.getInventory().deleteItem(2436, 1);
					player.getInventory().deleteItem(23261, 1);
					player.getInventory().addItem(149, 1);
					player.getInventory().addItem(23255, 1);
				}
			}
			// Super Attack (4) into Super Attack Flask (2)
			if (usedWith.getId() == 2436 || usedWith.getId() == 23263) {
				if (player.getInventory().containsItem(2436, 1)
						&& player.getInventory().containsItem(23263, 1)) {
					player.getInventory().deleteItem(2436, 1);
					player.getInventory().deleteItem(23263, 1);
					player.getInventory().addItem(229, 1);
					player.getInventory().addItem(23255, 1);
				}
			}
			// Super Attack (4) into Super Attack Flask (1)
			if (usedWith.getId() == 2436 || usedWith.getId() == 23265) {
				if (player.getInventory().containsItem(2436, 1)
						&& player.getInventory().containsItem(23265, 1)) {
					player.getInventory().deleteItem(2436, 1);
					player.getInventory().deleteItem(23265, 1);
					player.getInventory().addItem(229, 1);
					player.getInventory().addItem(23257, 1);
				}
			}
			// Super Attack (4) into Empty Flask
			if (usedWith.getId() == 2436 || usedWith.getId() == 23191) {
				if (player.getInventory().containsItem(2436, 1)
						&& player.getInventory().containsItem(23191, 1)) {
					player.getInventory().deleteItem(2436, 1);
					player.getInventory().deleteItem(23191, 1);
					player.getInventory().addItem(23259, 1);
				}
			}
			// Super Attack (3) into Empty Flask
			if (usedWith.getId() == 145 || usedWith.getId() == 23191) {
				if (player.getInventory().containsItem(145, 1)
						&& player.getInventory().containsItem(23191, 1)) {
					player.getInventory().deleteItem(145, 1);
					player.getInventory().deleteItem(23191, 1);
					player.getInventory().addItem(23261, 1);
				}
			}
			// Super Attack (2) into Empty Flask
			if (usedWith.getId() == 147 || usedWith.getId() == 23191) {
				if (player.getInventory().containsItem(147, 1)
						&& player.getInventory().containsItem(23191, 1)) {
					player.getInventory().deleteItem(147, 1);
					player.getInventory().deleteItem(23191, 1);
					player.getInventory().addItem(23263, 1);
				}
			}
			// Super Attack (1) into Empty Flask
			if (usedWith.getId() == 149 || usedWith.getId() == 23191) {
				if (player.getInventory().containsItem(149, 1)
						&& player.getInventory().containsItem(23191, 1)) {
					player.getInventory().deleteItem(149, 1);
					player.getInventory().deleteItem(23191, 1);
					player.getInventory().addItem(23265, 1);
				}
			}
			// Super Strength (1) into Super Strength Flask (5)
			if (usedWith.getId() == 161 || usedWith.getId() == 23281) {
				if (player.getInventory().containsItem(161, 1)
						&& player.getInventory().containsItem(23281, 1)) {
					player.getInventory().deleteItem(161, 1);
					player.getInventory().deleteItem(23281, 1);
					player.getInventory().addItem(229, 1);
					player.getInventory().addItem(23279, 1);
				}
			}
			// Super Strength (1) into Super Strength Flask (4)
			if (usedWith.getId() == 161 || usedWith.getId() == 23283) {
				if (player.getInventory().containsItem(161, 1)
						&& player.getInventory().containsItem(23283, 1)) {
					player.getInventory().deleteItem(161, 1);
					player.getInventory().deleteItem(23283, 1);
					player.getInventory().addItem(229, 1);
					player.getInventory().addItem(23281, 1);
				}
			}
			// Super Strength (1) into Super Strength Flask (3)
			if (usedWith.getId() == 161 || usedWith.getId() == 23285) {
				if (player.getInventory().containsItem(161, 1)
						&& player.getInventory().containsItem(23285, 1)) {
					player.getInventory().deleteItem(161, 1);
					player.getInventory().deleteItem(23285, 1);
					player.getInventory().addItem(229, 1);
					player.getInventory().addItem(23283, 1);
				}
			}
			// Super Strength (1) into Super Strength Flask (2)
			if (usedWith.getId() == 161 || usedWith.getId() == 23287) {
				if (player.getInventory().containsItem(161, 1)
						&& player.getInventory().containsItem(23287, 1)) {
					player.getInventory().deleteItem(161, 1);
					player.getInventory().deleteItem(23287, 1);
					player.getInventory().addItem(229, 1);
					player.getInventory().addItem(23285, 1);
				}
			}
			// Super Strength (1) into Super Strength Flask (1)
			if (usedWith.getId() == 161 || usedWith.getId() == 23289) {
				if (player.getInventory().containsItem(161, 1)
						&& player.getInventory().containsItem(23289, 1)) {
					player.getInventory().deleteItem(161, 1);
					player.getInventory().deleteItem(23289, 1);
					player.getInventory().addItem(229, 1);
					player.getInventory().addItem(23287, 1);
				}
			}
			// Super Strength (2) into Super Strength Flask (5)
			if (usedWith.getId() == 159 || usedWith.getId() == 23281) {
				if (player.getInventory().containsItem(159, 1)
						&& player.getInventory().containsItem(23281, 1)) {
					player.getInventory().deleteItem(159, 1);
					player.getInventory().deleteItem(23281, 1);
					player.getInventory().addItem(161, 1);
					player.getInventory().addItem(23279, 1);
				}
			}
			// Super Strength (2) into Super Strength Flask (4)
			if (usedWith.getId() == 159 || usedWith.getId() == 23283) {
				if (player.getInventory().containsItem(159, 1)
						&& player.getInventory().containsItem(23283, 1)) {
					player.getInventory().deleteItem(159, 1);
					player.getInventory().deleteItem(23283, 1);
					player.getInventory().addItem(229, 1);
					player.getInventory().addItem(23279, 1);
				}
			}
			// Super Strength (2) into Super Strength Flask (3)
			if (usedWith.getId() == 159 || usedWith.getId() == 23285) {
				if (player.getInventory().containsItem(159, 1)
						&& player.getInventory().containsItem(23285, 1)) {
					player.getInventory().deleteItem(159, 1);
					player.getInventory().deleteItem(23285, 1);
					player.getInventory().addItem(229, 1);
					player.getInventory().addItem(23281, 1);
				}
			}
			// Super Strength (2) into Super Strength Flask (2)
			if (usedWith.getId() == 159 || usedWith.getId() == 23287) {
				if (player.getInventory().containsItem(159, 1)
						&& player.getInventory().containsItem(23287, 1)) {
					player.getInventory().deleteItem(159, 1);
					player.getInventory().deleteItem(23287, 1);
					player.getInventory().addItem(229, 1);
					player.getInventory().addItem(23283, 1);
				}
			}
			// Super Strength (2) into Super Strength Flask (1)
			if (usedWith.getId() == 159 || usedWith.getId() == 23289) {
				if (player.getInventory().containsItem(159, 1)
						&& player.getInventory().containsItem(23289, 1)) {
					player.getInventory().deleteItem(159, 1);
					player.getInventory().deleteItem(23289, 1);
					player.getInventory().addItem(229, 1);
					player.getInventory().addItem(23285, 1);
				}
			}
			// Super Strength (3) into Super Strength Flask (5)
			if (usedWith.getId() == 157 || usedWith.getId() == 23281) {
				if (player.getInventory().containsItem(157, 1)
						&& player.getInventory().containsItem(23281, 1)) {
					player.getInventory().deleteItem(157, 1);
					player.getInventory().deleteItem(23281, 1);
					player.getInventory().addItem(159, 1);
					player.getInventory().addItem(23279, 1);
				}
			}
			// Super Strength (3) into Super Strength Flask (4)
			if (usedWith.getId() == 157 || usedWith.getId() == 23283) {
				if (player.getInventory().containsItem(157, 1)
						&& player.getInventory().containsItem(23283, 1)) {
					player.getInventory().deleteItem(157, 1);
					player.getInventory().deleteItem(23283, 1);
					player.getInventory().addItem(161, 1);
					player.getInventory().addItem(23279, 1);
				}
			}
			// Super Strength (3) into Super Strength Flask (3)
			if (usedWith.getId() == 157 || usedWith.getId() == 23285) {
				if (player.getInventory().containsItem(157, 1)
						&& player.getInventory().containsItem(23285, 1)) {
					player.getInventory().deleteItem(157, 1);
					player.getInventory().deleteItem(23285, 1);
					player.getInventory().addItem(229, 1);
					player.getInventory().addItem(23279, 1);
				}
			}
			// Super Strength (3) into Super Strength Flask (2)
			if (usedWith.getId() == 157 || usedWith.getId() == 23287) {
				if (player.getInventory().containsItem(157, 1)
						&& player.getInventory().containsItem(23287, 1)) {
					player.getInventory().deleteItem(157, 1);
					player.getInventory().deleteItem(23287, 1);
					player.getInventory().addItem(229, 1);
					player.getInventory().addItem(23281, 1);
				}
			}
			// Super Strength (3) into Super Strength Flask (1)
			if (usedWith.getId() == 157 || usedWith.getId() == 23289) {
				if (player.getInventory().containsItem(157, 1)
						&& player.getInventory().containsItem(23289, 1)) {
					player.getInventory().deleteItem(157, 1);
					player.getInventory().deleteItem(23289, 1);
					player.getInventory().addItem(229, 1);
					player.getInventory().addItem(23283, 1);
				}
			}
			// Super Strength (4) into Super Strength Flask (5)
			if (usedWith.getId() == 2440 || usedWith.getId() == 23281) {
				if (player.getInventory().containsItem(2440, 1)
						&& player.getInventory().containsItem(23281, 1)) {
					player.getInventory().deleteItem(2440, 1);
					player.getInventory().deleteItem(23281, 1);
					player.getInventory().addItem(157, 1);
					player.getInventory().addItem(23279, 1);
				}
			}
			// Super Strength (4) into Super Strength Flask (4)
			if (usedWith.getId() == 2440 || usedWith.getId() == 23283) {
				if (player.getInventory().containsItem(2440, 1)
						&& player.getInventory().containsItem(23283, 1)) {
					player.getInventory().deleteItem(2440, 1);
					player.getInventory().deleteItem(23283, 1);
					player.getInventory().addItem(159, 1);
					player.getInventory().addItem(23279, 1);
				}
			}
			// Super Strength (4) into Super Strength Flask (3)
			if (usedWith.getId() == 2440 || usedWith.getId() == 23285) {
				if (player.getInventory().containsItem(2440, 1)
						&& player.getInventory().containsItem(23285, 1)) {
					player.getInventory().deleteItem(2440, 1);
					player.getInventory().deleteItem(23285, 1);
					player.getInventory().addItem(161, 1);
					player.getInventory().addItem(23279, 1);
				}
			}
			// Super Strength (4) into Super Strength Flask (2)
			if (usedWith.getId() == 2440 || usedWith.getId() == 23287) {
				if (player.getInventory().containsItem(2440, 1)
						&& player.getInventory().containsItem(23287, 1)) {
					player.getInventory().deleteItem(2440, 1);
					player.getInventory().deleteItem(23287, 1);
					player.getInventory().addItem(229, 1);
					player.getInventory().addItem(23279, 1);
				}
			}
			// Super Strength (4) into Super Strength Flask (1)
			if (usedWith.getId() == 2440 || usedWith.getId() == 23289) {
				if (player.getInventory().containsItem(2440, 1)
						&& player.getInventory().containsItem(23289, 1)) {
					player.getInventory().deleteItem(2440, 1);
					player.getInventory().deleteItem(23289, 1);
					player.getInventory().addItem(229, 1);
					player.getInventory().addItem(23281, 1);
				}
			}
			// Super Strength (4) into Empty Flask
			if (usedWith.getId() == 2440 || usedWith.getId() == 23191) {
				if (player.getInventory().containsItem(2440, 1)
						&& player.getInventory().containsItem(23191, 1)) {
					player.getInventory().deleteItem(2440, 1);
					player.getInventory().deleteItem(23191, 1);
					player.getInventory().addItem(23283, 1);
				}
			}
			// Super Strength (3) into Empty Flask
			if (usedWith.getId() == 157 || usedWith.getId() == 23191) {
				if (player.getInventory().containsItem(157, 1)
						&& player.getInventory().containsItem(23191, 1)) {
					player.getInventory().deleteItem(157, 1);
					player.getInventory().deleteItem(23191, 1);
					player.getInventory().addItem(23285, 1);
				}
			}
			// Super Strength (2) into Empty Flask
			if (usedWith.getId() == 159 || usedWith.getId() == 23191) {
				if (player.getInventory().containsItem(159, 1)
						&& player.getInventory().containsItem(23191, 1)) {
					player.getInventory().deleteItem(159, 1);
					player.getInventory().deleteItem(23191, 1);
					player.getInventory().addItem(23287, 1);
				}
			}
			// Super Strength (1) into Empty Flask
			if (usedWith.getId() == 161 || usedWith.getId() == 23191) {
				if (player.getInventory().containsItem(161, 1)
						&& player.getInventory().containsItem(23191, 1)) {
					player.getInventory().deleteItem(161, 1);
					player.getInventory().deleteItem(23191, 1);
					player.getInventory().addItem(23289, 1);
				}
			}
			// Super Defence (1) into Super Defence Flask (5)
			if (usedWith.getId() == 167 || usedWith.getId() == 23293) {
				if (player.getInventory().containsItem(167, 1)
						&& player.getInventory().containsItem(23293, 1)) {
					player.getInventory().deleteItem(167, 1);
					player.getInventory().deleteItem(23293, 1);
					player.getInventory().addItem(229, 1);
					player.getInventory().addItem(23291, 1);
				}
			}
			// Super Defence (1) into Super Defence Flask (4)
			if (usedWith.getId() == 167 || usedWith.getId() == 23295) {
				if (player.getInventory().containsItem(167, 1)
						&& player.getInventory().containsItem(23295, 1)) {
					player.getInventory().deleteItem(167, 1);
					player.getInventory().deleteItem(23295, 1);
					player.getInventory().addItem(229, 1);
					player.getInventory().addItem(23293, 1);
				}
			}
			// Super Defence (1) into Super Defence Flask (3)
			if (usedWith.getId() == 167 || usedWith.getId() == 23297) {
				if (player.getInventory().containsItem(167, 1)
						&& player.getInventory().containsItem(23297, 1)) {
					player.getInventory().deleteItem(167, 1);
					player.getInventory().deleteItem(23297, 1);
					player.getInventory().addItem(229, 1);
					player.getInventory().addItem(23295, 1);
				}
			}
			// Super Defence (1) into Super Defence Flask (2)
			if (usedWith.getId() == 167 || usedWith.getId() == 23299) {
				if (player.getInventory().containsItem(167, 1)
						&& player.getInventory().containsItem(23299, 1)) {
					player.getInventory().deleteItem(167, 1);
					player.getInventory().deleteItem(23299, 1);
					player.getInventory().addItem(229, 1);
					player.getInventory().addItem(23297, 1);
				}
			}
			// Super Defence (1) into Super Defence Flask (1)
			if (usedWith.getId() == 167 || usedWith.getId() == 23301) {
				if (player.getInventory().containsItem(167, 1)
						&& player.getInventory().containsItem(23301, 1)) {
					player.getInventory().deleteItem(167, 1);
					player.getInventory().deleteItem(23301, 1);
					player.getInventory().addItem(229, 1);
					player.getInventory().addItem(23299, 1);
				}
			}
			// Super Defence (2) into Super Defence Flask (5)
			if (usedWith.getId() == 165 || usedWith.getId() == 23293) {
				if (player.getInventory().containsItem(165, 1)
						&& player.getInventory().containsItem(23293, 1)) {
					player.getInventory().deleteItem(165, 1);
					player.getInventory().deleteItem(23293, 1);
					player.getInventory().addItem(167, 1);
					player.getInventory().addItem(23291, 1);
				}
			}
			// Super Defence (2) into Super Defence Flask (4)
			if (usedWith.getId() == 165 || usedWith.getId() == 23295) {
				if (player.getInventory().containsItem(165, 1)
						&& player.getInventory().containsItem(23295, 1)) {
					player.getInventory().deleteItem(165, 1);
					player.getInventory().deleteItem(23295, 1);
					player.getInventory().addItem(229, 1);
					player.getInventory().addItem(23291, 1);
				}
			}
			// Super Defence (2) into Super Defence Flask (3)
			if (usedWith.getId() == 165 || usedWith.getId() == 23297) {
				if (player.getInventory().containsItem(165, 1)
						&& player.getInventory().containsItem(23297, 1)) {
					player.getInventory().deleteItem(165, 1);
					player.getInventory().deleteItem(23297, 1);
					player.getInventory().addItem(229, 1);
					player.getInventory().addItem(23293, 1);
				}
			}
			// Super Defence (2) into Super Defence Flask (2)
			if (usedWith.getId() == 165 || usedWith.getId() == 23299) {
				if (player.getInventory().containsItem(165, 1)
						&& player.getInventory().containsItem(23299, 1)) {
					player.getInventory().deleteItem(165, 1);
					player.getInventory().deleteItem(23299, 1);
					player.getInventory().addItem(229, 1);
					player.getInventory().addItem(23295, 1);
				}
			}
			// Super Defence (2) into Super Defence Flask (1)
			if (usedWith.getId() == 165 || usedWith.getId() == 23301) {
				if (player.getInventory().containsItem(165, 1)
						&& player.getInventory().containsItem(23301, 1)) {
					player.getInventory().deleteItem(165, 1);
					player.getInventory().deleteItem(23301, 1);
					player.getInventory().addItem(229, 1);
					player.getInventory().addItem(23297, 1);
				}
			}
			// Super Defence (3) into Super Defence Flask (5)
			if (usedWith.getId() == 163 || usedWith.getId() == 23293) {
				if (player.getInventory().containsItem(163, 1)
						&& player.getInventory().containsItem(23293, 1)) {
					player.getInventory().deleteItem(163, 1);
					player.getInventory().deleteItem(23293, 1);
					player.getInventory().addItem(165, 1);
					player.getInventory().addItem(23291, 1);
				}
			}
			// Super Defence (3) into Super Defence Flask (4)
			if (usedWith.getId() == 163 || usedWith.getId() == 23295) {
				if (player.getInventory().containsItem(163, 1)
						&& player.getInventory().containsItem(23295, 1)) {
					player.getInventory().deleteItem(163, 1);
					player.getInventory().deleteItem(23295, 1);
					player.getInventory().addItem(167, 1);
					player.getInventory().addItem(23291, 1);
				}
			}
			// Super Defence (3) into Super Defence Flask (3)
			if (usedWith.getId() == 163 || usedWith.getId() == 23297) {
				if (player.getInventory().containsItem(163, 1)
						&& player.getInventory().containsItem(23297, 1)) {
					player.getInventory().deleteItem(163, 1);
					player.getInventory().deleteItem(23297, 1);
					player.getInventory().addItem(229, 1);
					player.getInventory().addItem(23291, 1);
				}
			}
			// Super Defence (3) into Super Defence Flask (2)
			if (usedWith.getId() == 163 || usedWith.getId() == 23299) {
				if (player.getInventory().containsItem(163, 1)
						&& player.getInventory().containsItem(23299, 1)) {
					player.getInventory().deleteItem(163, 1);
					player.getInventory().deleteItem(23299, 1);
					player.getInventory().addItem(229, 1);
					player.getInventory().addItem(23293, 1);
				}
			}
			// Super Defence (3) into Super Defence Flask (1)
			if (usedWith.getId() == 163 || usedWith.getId() == 23301) {
				if (player.getInventory().containsItem(163, 1)
						&& player.getInventory().containsItem(23301, 1)) {
					player.getInventory().deleteItem(163, 1);
					player.getInventory().deleteItem(23301, 1);
					player.getInventory().addItem(229, 1);
					player.getInventory().addItem(23295, 1);
				}
			}
			// Super Defence (4) into Super Defence Flask (5)
			if (usedWith.getId() == 2442 || usedWith.getId() == 23293) {
				if (player.getInventory().containsItem(2442, 1)
						&& player.getInventory().containsItem(23293, 1)) {
					player.getInventory().deleteItem(2442, 1);
					player.getInventory().deleteItem(23293, 1);
					player.getInventory().addItem(163, 1);
					player.getInventory().addItem(23291, 1);
				}
			}
			// Super Defence (4) into Super Defence Flask (4)
			if (usedWith.getId() == 2442 || usedWith.getId() == 23295) {
				if (player.getInventory().containsItem(2442, 1)
						&& player.getInventory().containsItem(23295, 1)) {
					player.getInventory().deleteItem(2442, 1);
					player.getInventory().deleteItem(23295, 1);
					player.getInventory().addItem(165, 1);
					player.getInventory().addItem(23291, 1);
				}
			}
			// Super Defence (4) into Super Defence Flask (3)
			if (usedWith.getId() == 2442 || usedWith.getId() == 23297) {
				if (player.getInventory().containsItem(2442, 1)
						&& player.getInventory().containsItem(23297, 1)) {
					player.getInventory().deleteItem(2442, 1);
					player.getInventory().deleteItem(23297, 1);
					player.getInventory().addItem(167, 1);
					player.getInventory().addItem(23291, 1);
				}
			}
			// Super Defence (4) into Super Defence Flask (2)
			if (usedWith.getId() == 2442 || usedWith.getId() == 23299) {
				if (player.getInventory().containsItem(2442, 1)
						&& player.getInventory().containsItem(23299, 1)) {
					player.getInventory().deleteItem(2442, 1);
					player.getInventory().deleteItem(23299, 1);
					player.getInventory().addItem(229, 1);
					player.getInventory().addItem(23291, 1);
				}
			}
			// Super Defence (4) into Super Defence Flask (1)
			if (usedWith.getId() == 2442 || usedWith.getId() == 23301) {
				if (player.getInventory().containsItem(2442, 1)
						&& player.getInventory().containsItem(23301, 1)) {
					player.getInventory().deleteItem(2442, 1);
					player.getInventory().deleteItem(23301, 1);
					player.getInventory().addItem(229, 1);
					player.getInventory().addItem(23293, 1);
				}
			}
			// Super Defence (4)
			if (usedWith.getId() == 2442 || usedWith.getId() == 23191) {
				if (player.getInventory().containsItem(2442, 1)
						&& player.getInventory().containsItem(23191, 1)) {
					player.getInventory().deleteItem(2442, 1);
					player.getInventory().deleteItem(23191, 1);
					player.getInventory().addItem(23295, 1);
				}
			}
			// Super Defence (3)
			if (usedWith.getId() == 163 || usedWith.getId() == 23191) {
				if (player.getInventory().containsItem(163, 1)
						&& player.getInventory().containsItem(23191, 1)) {
					player.getInventory().deleteItem(163, 1);
					player.getInventory().deleteItem(23191, 1);
					player.getInventory().addItem(23297, 1);
				}
			}
			// Super Defence (2)
			if (usedWith.getId() == 165 || usedWith.getId() == 23191) {
				if (player.getInventory().containsItem(165, 1)
						&& player.getInventory().containsItem(23191, 1)) {
					player.getInventory().deleteItem(165, 1);
					player.getInventory().deleteItem(23191, 1);
					player.getInventory().addItem(23299, 1);
				}
			}
			// Super Defence (1)
			if (usedWith.getId() == 167 || usedWith.getId() == 23191) {
				if (player.getInventory().containsItem(167, 1)
						&& player.getInventory().containsItem(23191, 1)) {
					player.getInventory().deleteItem(167, 1);
					player.getInventory().deleteItem(23191, 1);
					player.getInventory().addItem(23301, 1);
				}
			}

			/**
			 * Overloads
			 */

			// Overload (1) into Overload Flask (5)
			if (usedWith.getId() == 15335 || usedWith.getId() == 23532) {
				if (player.getInventory().containsItem(15335, 1)
						&& player.getInventory().containsItem(26751, 1)) {
					player.getInventory().deleteItem(15335, 1);
					player.getInventory().deleteItem(23532, 1);
					player.getInventory().addItem(229, 1);
					player.getInventory().addItem(23531, 1); // id for (6)
				}
			}
			// Overload (1) into Overload Flask (4)
			if (usedWith.getId() == 15335 || usedWith.getId() == 23533) {
				if (player.getInventory().containsItem(15335, 1)
						&& player.getInventory().containsItem(23533, 1)) {
					player.getInventory().deleteItem(15335, 1);
					player.getInventory().deleteItem(23533, 1);
					player.getInventory().addItem(229, 1);
					player.getInventory().addItem(23532, 1); // id for (5)
				}
			}
			// Overload (1) into Overload Flask (3)
			if (usedWith.getId() == 15335 || usedWith.getId() == 23534) {
				if (player.getInventory().containsItem(15335, 1)
						&& player.getInventory().containsItem(23534, 1)) {
					player.getInventory().deleteItem(15335, 1);
					player.getInventory().deleteItem(23534, 1);
					player.getInventory().addItem(229, 1);
					player.getInventory().addItem(23533, 1); // id for (4)
				}
			}
			// Overload (1) into Overload Flask (2)
			if (usedWith.getId() == 15335 || usedWith.getId() == 23535) {
				if (player.getInventory().containsItem(15335, 1)
						&& player.getInventory().containsItem(23535, 1)) {
					player.getInventory().deleteItem(15335, 1);
					player.getInventory().deleteItem(23535, 1);
					player.getInventory().addItem(229, 1);
					player.getInventory().addItem(23534, 1); // id for (3)
				}
			}
			// Overload (1) into Overload Flask (1)
			if (usedWith.getId() == 15335 || usedWith.getId() == 23536) {
				if (player.getInventory().containsItem(15335, 1)
						&& player.getInventory().containsItem(23536, 1)) {
					player.getInventory().deleteItem(15335, 1);
					player.getInventory().deleteItem(23536, 1);
					player.getInventory().addItem(229, 1);
					player.getInventory().addItem(23535, 1); // id for (2)
				}
			}
			// Overload (2) into Overload Flask (5)
			if (usedWith.getId() == 15334 || usedWith.getId() == 23532) {
				if (player.getInventory().containsItem(15334, 1)
						&& player.getInventory().containsItem(23532, 1)) {
					player.getInventory().deleteItem(15334, 1);
					player.getInventory().deleteItem(23532, 1);
					player.getInventory().addItem(167, 1);
					player.getInventory().addItem(23531, 1); // id for (6)
				}
			}
			// Overload (2) into Overload Flask (4)
			if (usedWith.getId() == 15334 || usedWith.getId() == 23533) {
				if (player.getInventory().containsItem(15334, 1)
						&& player.getInventory().containsItem(23533, 1)) {
					player.getInventory().deleteItem(15334, 1);
					player.getInventory().deleteItem(23533, 1);
					player.getInventory().addItem(167, 1);
					player.getInventory().addItem(23531, 1); // id for (6)
				}
			}
			// Overload (2) into Overload Flask (3)
			if (usedWith.getId() == 15334 || usedWith.getId() == 23534) {
				if (player.getInventory().containsItem(15334, 1)
						&& player.getInventory().containsItem(23534, 1)) {
					player.getInventory().deleteItem(15334, 1);
					player.getInventory().deleteItem(23534, 1);
					player.getInventory().addItem(229, 1);
					player.getInventory().addItem(23532, 1); // id for (5)
				}
			}
			// Overload (2) into Overload Flask (2)
			if (usedWith.getId() == 15334 || usedWith.getId() == 23535) {
				if (player.getInventory().containsItem(15334, 1)
						&& player.getInventory().containsItem(23535, 1)) {
					player.getInventory().deleteItem(15334, 1);
					player.getInventory().deleteItem(23535, 1);
					player.getInventory().addItem(229, 1);
					player.getInventory().addItem(23533, 1); // id for (4)
				}
			}
			// Overload (2) into Overload Flask (1)
			if (usedWith.getId() == 15334 || usedWith.getId() == 23536) {
				if (player.getInventory().containsItem(15334, 1)
						&& player.getInventory().containsItem(23536, 1)) {
					player.getInventory().deleteItem(15334, 1);
					player.getInventory().deleteItem(23536, 1);
					player.getInventory().addItem(229, 1);
					player.getInventory().addItem(23534, 1); // id for (3)
				}
			}
			// Overload (3) into Overload Flask (5)
			if (usedWith.getId() == 15333 || usedWith.getId() == 23532) {
				if (player.getInventory().containsItem(15333, 1)
						&& player.getInventory().containsItem(23532, 1)) {
					player.getInventory().deleteItem(15333, 1);
					player.getInventory().deleteItem(23532, 1);
					player.getInventory().addItem(15333, 1);
					player.getInventory().addItem(23531, 1); // id for (6)
				}
			}
			// Overload (3) into Overload Flask (4)
			if (usedWith.getId() == 15333 || usedWith.getId() == 23533) {
				if (player.getInventory().containsItem(15333, 1)
						&& player.getInventory().containsItem(23533, 1)) {
					player.getInventory().deleteItem(15333, 1);
					player.getInventory().deleteItem(23533, 1);
					player.getInventory().addItem(167, 1);
					player.getInventory().addItem(23531, 1); // id for (6)
				}
			}
			// Overload (3) into Overload Flask (3)
			if (usedWith.getId() == 15333 || usedWith.getId() == 23534) {
				if (player.getInventory().containsItem(15333, 1)
						&& player.getInventory().containsItem(23534, 1)) {
					player.getInventory().deleteItem(15333, 1);
					player.getInventory().deleteItem(23534, 1);
					player.getInventory().addItem(167, 1);
					player.getInventory().addItem(23531, 1); // id for (6)
				}
			}
			// Overload (3) into Overload Flask (2)
			if (usedWith.getId() == 15333 || usedWith.getId() == 23535) {
				if (player.getInventory().containsItem(15333, 1)
						&& player.getInventory().containsItem(23535, 1)) {
					player.getInventory().deleteItem(15333, 1);
					player.getInventory().deleteItem(23535, 1);
					player.getInventory().addItem(229, 1);
					player.getInventory().addItem(23532, 1); // id for (5)
				}
			}
			// Overload (3) into Overload Flask (1)
			if (usedWith.getId() == 15333 || usedWith.getId() == 23536) {
				if (player.getInventory().containsItem(15333, 1)
						&& player.getInventory().containsItem(23536, 1)) {
					player.getInventory().deleteItem(15333, 1);
					player.getInventory().deleteItem(23536, 1);
					player.getInventory().addItem(229, 1);
					player.getInventory().addItem(23533, 1); // id for (4)
				}
			}
			// Overload (4) into Overload Flask (5)
			if (usedWith.getId() == 15332 || usedWith.getId() == 23532) {
				if (player.getInventory().containsItem(15332, 1)
						&& player.getInventory().containsItem(23532, 1)) {
					player.getInventory().deleteItem(15332, 1);
					player.getInventory().deleteItem(23532, 1);
					player.getInventory().addItem(163, 1);
					player.getInventory().addItem(23531, 1); // id for (6)
				}
			}
			// Overload (4) into Overload Flask (4)
			if (usedWith.getId() == 15332 || usedWith.getId() == 23533) {
				if (player.getInventory().containsItem(15332, 1)
						&& player.getInventory().containsItem(23533, 1)) {
					player.getInventory().deleteItem(15332, 1);
					player.getInventory().deleteItem(23533, 1);
					player.getInventory().addItem(165, 1);
					player.getInventory().addItem(23531, 1); // id for (6)
				}
			}
			// Overload (4) into Overload Flask (3)
			if (usedWith.getId() == 15332 || usedWith.getId() == 23534) {
				if (player.getInventory().containsItem(15332, 1)
						&& player.getInventory().containsItem(23534, 1)) {
					player.getInventory().deleteItem(15332, 1);
					player.getInventory().deleteItem(23534, 1);
					player.getInventory().addItem(167, 1);
					player.getInventory().addItem(23531, 1); // id for (6)
				}
			}
			// Overload (4) into Overload Flask (2)
			if (usedWith.getId() == 15332 || usedWith.getId() == 23535) {
				if (player.getInventory().containsItem(15332, 1)
						&& player.getInventory().containsItem(23535, 1)) {
					player.getInventory().deleteItem(15332, 1);
					player.getInventory().deleteItem(23535, 1);
					player.getInventory().addItem(229, 1);
					player.getInventory().addItem(23531, 1); // id for (6)
				}
			}
			// Overload (4) into Overload Flask (1)
			if (usedWith.getId() == 15332 || usedWith.getId() == 23536) {
				if (player.getInventory().containsItem(15332, 1)
						&& player.getInventory().containsItem(23536, 1)) {
					player.getInventory().deleteItem(15332, 1);
					player.getInventory().deleteItem(23536, 1);
					player.getInventory().addItem(229, 1);
					player.getInventory().addItem(23532, 1); // id for (5)
				}
			}
			// Overload (1)
			if (usedWith.getId() == 15335 || usedWith.getId() == 23191) {
				if (player.getInventory().containsItem(15335, 1)
						&& player.getInventory().containsItem(23191, 1)) {
					player.getInventory().deleteItem(15335, 1);
					player.getInventory().deleteItem(23191, 1);
					player.getInventory().addItem(23536, 1);
				}
			}
			// Overload (2)
			if (usedWith.getId() == 15334 || usedWith.getId() == 23191) {
				if (player.getInventory().containsItem(15334, 1)
						&& player.getInventory().containsItem(23191, 1)) {
					player.getInventory().deleteItem(15334, 1);
					player.getInventory().deleteItem(23191, 1);
					player.getInventory().addItem(23535, 1);
				}
			}
			// Overload (3)
			if (usedWith.getId() == 15333 || usedWith.getId() == 23191) {
				if (player.getInventory().containsItem(15333, 1)
						&& player.getInventory().containsItem(23191, 1)) {
					player.getInventory().deleteItem(15333, 1);
					player.getInventory().deleteItem(23191, 1);
					player.getInventory().addItem(23534, 1);
				}
			}
			// Overload (4)
			if (usedWith.getId() == 15332 || usedWith.getId() == 23191) {
				if (player.getInventory().containsItem(15332, 1)
						&& player.getInventory().containsItem(23191, 1)) {
					player.getInventory().deleteItem(15332, 1);
					player.getInventory().deleteItem(23191, 1);
					player.getInventory().addItem(23533, 1);
				}
			}
			if (itemUsed.getId() == LeatherCrafting.NEEDLE.getId()
					|| usedWith.getId() == LeatherCrafting.NEEDLE.getId()) {
				if (LeatherCrafting
						.handleItemOnItem(player, itemUsed, usedWith)) {
					return;
				}
			} else if (itemUsed.getId() == 24352 && usedWith.getId() == 11874) {
				player.getInventory().deleteItem(24352, 1);
				player.getInventory().deleteItem(11874, 1);
				player.getInventory().addItem(24354, 1);
				player.getInventory().addItem(24355, 1);
				player.getInventory().addItem(24356, 1);
				player.getInventory().addItem(24357, 1);
				player.getInventory().addItem(24358, 1);
				player.sm("Your Infinity robes have turned into Dragonbone robes!");
			}
			Sets set = ArmourSets.getArmourSet(itemUsedId, itemUsedWithId);
			if (set != null) {
				ArmourSets.exchangeSets(player, set);
				return;
			}
			if (Firemaking.isFiremaking(player, itemUsed, usedWith))
				return;
			else if (contains(1755, Gem.OPAL.getUncut(), itemUsed, usedWith))
				GemCutting.cut(player, Gem.OPAL);
			else if (contains(1755, Gem.JADE.getUncut(), itemUsed, usedWith))
				GemCutting.cut(player, Gem.JADE);
			else if (contains(1755, Gem.RED_TOPAZ.getUncut(), itemUsed,
					usedWith))
				GemCutting.cut(player, Gem.RED_TOPAZ);
			else if (contains(1755, Gem.SAPPHIRE.getUncut(), itemUsed, usedWith))
				GemCutting.cut(player, Gem.SAPPHIRE);
			else if (contains(1755, Gem.EMERALD.getUncut(), itemUsed, usedWith))
				GemCutting.cut(player, Gem.EMERALD);
			else if (contains(1755, Gem.RUBY.getUncut(), itemUsed, usedWith))
				GemCutting.cut(player, Gem.RUBY);
			else if (contains(1755, Gem.DIAMOND.getUncut(), itemUsed, usedWith))
				GemCutting.cut(player, Gem.DIAMOND);
			else if (contains(1755, Gem.DRAGONSTONE.getUncut(), itemUsed,
					usedWith))
				GemCutting.cut(player, Gem.DRAGONSTONE);
			else if (contains(1755, Gem.ONYX.getUncut(), itemUsed, usedWith))
				GemCutting.cut(player, Gem.ONYX);
			else
				player.getPackets().sendGameMessage(
						"Nothing interesting happens.");
			if (Settings.DEBUG)
				Logger.log("ItemHandler", "Used:" + itemUsed.getId()
						+ ", With:" + usedWith.getId());
		}
	}

	public static void handleItemOption3(Player player, int slotId, int itemId,
			Item item) {
		long time = Utils.currentTimeMillis();
		if (player.getLockDelay() >= time
				|| player.getEmotesManager().getNextEmoteEnd() >= time)
			return;
		player.stopAll(false);
		if (itemId == 20767 || itemId == 20769 || itemId == 20771)
			SkillCapeCustomizer.startCustomizing(player, itemId);
		else if (itemId == 15707)
			Magic.DaemonheimTeleport(player, new WorldTile(3449, 3698, 0));
		else if (itemId >= 15084 && itemId <= 15100)
			player.getDialogueManager().startDialogue("DiceBag", itemId);
		else if (itemId == 24437 || itemId == 24439 || itemId == 24440
				|| itemId == 24441)
			player.getDialogueManager().startDialogue("FlamingSkull", item,
					slotId);
		else if (Equipment.getItemSlot(itemId) == Equipment.SLOT_AURA)
			player.getAuraManager().sendTimeRemaining(itemId);
		else if (itemId == 15098) {
			if (player.isExtremeDonator()) {
				player.getPackets().sendGameMessage("Rolling...");
				player.setNextGraphics(new Graphics(2075));
				player.setNextAnimation(new Animation(11900));
				int numberRolled = Utils.getRandom(100);
				player.setNextForceTalk(new ForceTalk("You rolled <col=FF0000>"
						+ numberRolled + "</col> " + "on the percentile dice"));
				player.getPackets().sendGameMessage(
						"rolled <col=FF0000>" + numberRolled + "</col> "
								+ "on the percentile dice");
			}
		}
		/**
		 * 
		 * Start of upgrading system.
		 * 
		 */
		else if (itemId == 1275) {
			if (!player.getInventory().containsItem(13727, 500)) {
				player.getPackets().sendGameMessage(
						"You need 500 Stardust to upgrade this!");
				return;
			}
			if (!player.getInventory().containsItem(1275, 1)) {
				player.getPackets().sendGameMessage(
						"A Rune pickaxe could not be found in your inventory.");
				return;
			}
			player.getInventory().deleteItem(1275, 1);
			player.getInventory().deleteItem(13727, 500);
			player.setNextGraphics(new Graphics(92));
			player.setNextAnimation(new Animation(9104));
			player.getInventory().addItem(15259, 1);
		} else if (itemId == 10828) {
			if (!player.getInventory().containsItem(13727, 500)) {
				player.getPackets().sendGameMessage(
						"You need 500 Stardust to upgrade this!");
				return;
			}
			if (!player.getInventory().containsItem(10828, 1)) {
				player.getPackets().sendGameMessage("You need a helm first.");
				return;
			}
			player.getInventory().deleteItem(10828, 1);
			player.getInventory().deleteItem(13727, 500);
			player.setNextGraphics(new Graphics(92));
			player.setNextAnimation(new Animation(9104));
			player.getInventory().addItem(12680, 1);
		/*	for (Player players : World.getPlayers()) {
				if (players == null)
					continue;
				players.getPackets()
						.sendGameMessage(
								"<img=5><col=ff0000>"
										+ player.getDisplayName()
										+ "</col> has enchanted their <col=ff0000>Helm of neitiznot</col>.");
			} */
		} else if (itemId == 1163) {
			if (!player.getInventory().containsItem(13727, 100)) {
				player.getPackets().sendGameMessage(
						"You need 100 Stardust to upgrade this!");
				return;
			}
			if (!player.getInventory().containsItem(1163, 1)) {
				player.getPackets().sendGameMessage("You need a helm first.");
				return;
			}
			player.getInventory().deleteItem(1163, 1);
			player.getInventory().deleteItem(13727, 100);
			player.setNextGraphics(new Graphics(92));
			player.setNextAnimation(new Animation(9104));
			player.getInventory().addItem(10828, 1);

		} else if (itemId == 1127) {
			if (!player.getInventory().containsItem(13727, 100)) {
				player.getPackets().sendGameMessage(
						"You need 100 Stardust to upgrade this!");
				return;
			}
			if (!player.getInventory().containsItem(1127, 1)) {
				player.getPackets().sendGameMessage(
						"You need a platebody first.");
				return;
			}
			player.getInventory().deleteItem(1127, 1);
			player.getInventory().deleteItem(13727, 100);
			player.setNextGraphics(new Graphics(92));
			player.setNextAnimation(new Animation(9104));
			player.getInventory().addItem(10551, 1);

		} else if (itemId == 6733) {
			if (!player.getInventory().containsItem(13727, 350)) {
				player.getPackets().sendGameMessage(
						"You need 350 Stardust to upgrade this!");
				return;
			}
			if (!player.getInventory().containsItem(6733, 1)) {
				player.getPackets().sendGameMessage("You need a ring first.");
				return;
			}
			player.getInventory().deleteItem(6733, 1);
			player.getInventory().deleteItem(13727, 350);
			player.setNextGraphics(new Graphics(92));
			player.setNextAnimation(new Animation(9104));
			player.getInventory().addItem(15019, 1);

		} else if (itemId == 6737) {
			if (!player.getInventory().containsItem(13727, 2000)) {
				player.getPackets().sendGameMessage(
						"You need 2000 Stardust to upgrade this!");
				return;
			}
			if (!player.getInventory().containsItem(6737, 1)) {
				player.getPackets().sendGameMessage("You need a ring first.");
				return;
			}
			player.getInventory().deleteItem(6737, 1);
			player.getInventory().deleteItem(13727, 2000);
			player.setNextGraphics(new Graphics(92));
			player.setNextAnimation(new Animation(9104));
			player.getInventory().addItem(15220, 1);
			for (Player players : World.getPlayers()) {
				if (players == null)
					continue;
				players.getPackets()
						.sendGameMessage(
								"<img=5><col=ff0000>"
										+ player.getDisplayName()
										+ "</col> has imbued their <col=ff0000>Berserker ring</col>.");
			}
		} else if (itemId == 6731) {
			if (!player.getInventory().containsItem(13727, 2000)) {
				player.getPackets().sendGameMessage(
						"You need 2000 Stardust to upgrade this!");
				return;
			}
			if (!player.getInventory().containsItem(6731, 1)) {
				player.getPackets().sendGameMessage("You need a ring first.");
				return;
			}
			player.getInventory().deleteItem(6731, 1);
			player.getInventory().deleteItem(13727, 2000);
			player.setNextGraphics(new Graphics(92));
			player.setNextAnimation(new Animation(9104));
			player.getInventory().addItem(15018, 1);
			for (Player players : World.getPlayers()) {
				if (players == null)
					continue;
				players.getPackets()
						.sendGameMessage(
								"<img=5><col=ff0000>"
										+ player.getDisplayName()
										+ "</col> has imbued their <col=ff0000>Seer's ring</col>.");
			}
		} else if (itemId == 15259) {
			if (!player.getInventory().containsItem(13727, 500)) {
				player.getPackets().sendGameMessage(
						"You need 500 Stardust to upgrade this!");
				return;
			}
			if (!player.getInventory().containsItem(15259, 1)) {
				player.getPackets().sendGameMessage("You need a weapon first.");
				return;
			}
			player.getInventory().deleteItem(15259, 1);
			player.getInventory().deleteItem(13727, 500);
			player.setNextGraphics(new Graphics(92));
			player.setNextAnimation(new Animation(9104));
			player.getInventory().addItem(20786, 1);
			for (Player players : World.getPlayers()) {
				if (players == null)
					continue;
				players.getPackets()
						.sendGameMessage(
								"<img=5><col=ff0000>"
										+ player.getDisplayName()
										+ "</col> has trimmed their <col=ff0000>Dragon pickaxe</col>.");
			}
		} else if (itemId == 8839) {
			if (!player.getInventory().containsItem(13727, 1500)) {
				player.getPackets().sendGameMessage(
						"You need 1500 Stardust to upgrade this!");
				return;
			}
			if (!player.getInventory().containsItem(8839, 1)) {
				player.getPackets().sendGameMessage("Missing item.");
				return;
			}
			player.getInventory().deleteItem(8839, 1);
			player.getInventory().deleteItem(13727, 1500);
			player.setNextGraphics(new Graphics(92));
			player.setNextAnimation(new Animation(9104));
			player.getInventory().addItem(19785, 1);

		} else if (itemId == 8840) {
			if (!player.getInventory().containsItem(13727, 1500)) {
				player.getPackets().sendGameMessage(
						"You need 1500 Stardust to upgrade this!");
				return;
			}
			if (!player.getInventory().containsItem(8840, 1)) {
				player.getPackets().sendGameMessage("Missing item.");
				return;
			}
			player.getInventory().deleteItem(8840, 1);
			player.getInventory().deleteItem(13727, 1500);
			player.setNextGraphics(new Graphics(92));
			player.setNextAnimation(new Animation(9104));
			player.getInventory().addItem(19786, 1);

		} else if (itemId == 9339) {
			if (!player.getInventory().containsItem(13727, 75)) {
				player.getPackets().sendGameMessage(
						"You need 75 Stardust to enchant this!");
				return;
			}
			if (!player.getInventory().containsItem(9339, 1)) {
				player.getPackets().sendGameMessage("Missing item.");
				return;
			}
			player.getInventory().deleteItem(9339, 1);
			player.getInventory().deleteItem(13727, 75);
			player.setNextAnimation(new Animation(885));
			player.setNextGraphics(new Graphics(3));
			player.getInventory().addItem(9242, 1);
			for (Player players : World.getPlayers()) {
				if (players == null)
					continue;
			}
		} else if (itemId == 14484) {
			if (!player.getInventory().containsItem(13727, 15000)) {
				player.getPackets().sendGameMessage(
						"You need 15000 Stardust to upgrade this!");
				return;
			}
			if (!player.getInventory().containsItem(14484, 1)) {
				player.getPackets().sendGameMessage("Missing item.");
				return;
			}
			player.getInventory().deleteItem(14484, 1);
			player.getInventory().deleteItem(13727, 15000);
			player.setNextGraphics(new Graphics(92));
			player.setNextAnimation(new Animation(9104));
			player.getInventory().addItem(23695, 1);

		} else if (itemId == 11694) {
			if (!player.getInventory().containsItem(13727, 15000)) {
				player.getPackets().sendGameMessage(
						"You need 15000 Stardust to upgrade this!");
				return;
			}
			if (!player.getInventory().containsItem(11694, 1)) {
				player.getPackets().sendGameMessage("Missing item.");
				return;
			}
			player.getInventory().deleteItem(11694, 1);
			player.getInventory().deleteItem(13727, 15000);
			player.setNextGraphics(new Graphics(92));
			player.setNextAnimation(new Animation(9104));
			player.getInventory().addItem(23679, 1);

		} else if (itemId == 23679) {
			if (!player.getInventory().containsItem(13727, 5000)) {
				player.getPackets().sendGameMessage(
						"You need 5000 Stardust to upgrade this!");
				return;
			}
			if (!player.getInventory().containsItem(23679, 1)) {
				player.getPackets().sendGameMessage("Missing item.");
				return;
			}
			player.getInventory().deleteItem(23679, 1);
			player.getInventory().deleteItem(13727, 5000);
			player.setNextGraphics(new Graphics(92));
			player.setNextAnimation(new Animation(9104));
			player.getInventory().addItem(20821, 1);

		} else if (itemId == 4151) {
			if (!player.getInventory().containsItem(13727, 4500)) {
				player.getPackets().sendGameMessage(
						"You need 4500 Stardust to upgrade this!");
				return;
			}
			if (!player.getInventory().containsItem(4151, 1)) {
				player.getPackets().sendGameMessage("Missing item.");
				return;
			}
			player.getInventory().deleteItem(4151, 1);
			player.getInventory().deleteItem(13727, 4500);
			player.setNextGraphics(new Graphics(92));
			player.setNextAnimation(new Animation(9104));
			player.getInventory().addItem(23691, 1);

		}
	}

	public static void handleItemOption4(Player player, int slotId, int itemId,
			Item item) {
		System.out.println("Option 4");
	}

	public static void handleItemOption5(Player player, int slotId, int itemId,
			Item item) {
		System.out.println("Option 5");
	}

	public static void handleItemOption6(Player player, int slotId, int itemId,
			Item item) {
		long time = Utils.currentTimeMillis();
		if (player.getLockDelay() >= time
				|| player.getEmotesManager().getNextEmoteEnd() >= time)
			return;
		player.stopAll(false);
		Pouches pouches = Pouches.forId(itemId);
		if (pouches != null)
			Summoning.spawnFamiliar(player, pouches);
		else if (itemId == 1438)
			Runecrafting.locate(player, 3127, 3405);
		else if (itemId == 1440)
			Runecrafting.locate(player, 3306, 3474);
		else if (itemId == 1442)
			Runecrafting.locate(player, 3313, 3255);
		else if (itemId == 1444)
			Runecrafting.locate(player, 3185, 3165);
		else if (itemId == 1446)
			Runecrafting.locate(player, 3053, 3445);
		else if (itemId == 1448)
			Runecrafting.locate(player, 2982, 3514);
		else if (itemId <= 1712 && itemId >= 1706 || itemId >= 10354
				&& itemId <= 10362)
			player.getDialogueManager().startDialogue("Transportation",
					"Edgeville", new WorldTile(3087, 3496, 0), "Karamja",
					new WorldTile(2918, 3176, 0), "Draynor Village",
					new WorldTile(3105, 3251, 0), "Al Kharid",
					new WorldTile(3293, 3163, 0), itemId);
		else if (itemId == 1704 || itemId == 10352)
			player.getPackets()
					.sendGameMessage(
							"The amulet has ran out of charges. You need to recharge it if you wish it use it once more.");
		else if (itemId == 995) {
			player.getMoneyPouch().add(player.getInventory().getNumerOf(995));
		} else if (itemId >= 3853 && itemId <= 3867)
			player.getDialogueManager().startDialogue("Transportation",
					"Burthrope Games Room", new WorldTile(2880, 3559, 0),
					"Barbarian Outpost", new WorldTile(2519, 3571, 0),
					"Gamers' Grotto", new WorldTile(2970, 9679, 0),
					"Corporeal Beast", new WorldTile(2886, 4377, 0), itemId);
	}

	public static void handleItemOption7(Player player, int slotId, int itemId,
			Item item) {
		long time = Utils.currentTimeMillis();
		if (player.getLockDelay() >= time
				|| player.getEmotesManager().getNextEmoteEnd() >= time)
			return;
		if (!player.getControlerManager().canDropItem(item))
			return;
		player.stopAll(false);
		if (item.getDefinitions().isOverSized()) {
			player.getPackets().sendGameMessage(
					"The item appears to be oversized.");
			player.getInventory().deleteItem(item);
			return;
		}
		if (item.getDefinitions().isDestroyItem()) {
			player.getDialogueManager().startDialogue("DestroyItemOption",
					slotId, item);
			return;
		}
		if (player.getPetManager().spawnPet(itemId, true)) {
			return;
		}
		player.getInventory().deleteItem(slotId, item);
		if (player.getCharges().degradeCompletly(item))
			return;
		World.addGroundItem(item, new WorldTile(player), player, false, 180,
				true);
		player.getPackets().sendSound(2739, 0, 1);
	}

	public static void handleItemOption8(Player player, int slotId, int itemId,
			Item item) {
		player.getInventory().sendExamine(slotId);
	}

	public static void handleItemOnNPC(final Player player, final NPC npc,
			final Item item) {
		if (item == null) {
			return;
		}
		player.setCoordsEvent(new CoordsEvent(npc, new Runnable() {
			@Override
			public void run() {
				if (!player.getInventory().containsItem(item.getId(),
						item.getAmount())) {
					return;
				}
				if (npc instanceof Pet) {
					player.faceEntity(npc);
					player.getPetManager().eat(item.getId(), (Pet) npc);
					return;
				}
			}
		}, npc.getSize()));
	}
}
